0
我有2個序列號中的ArduinoArduino:如何從液晶屏上的串行打印數據(字符)?
串行 =要打印數據串中的串行(dataRaspi)
接口Serial1 =要讀取從 「接口Serial1」,並在液晶屏打印了這一點的DATAS。
這裏是我的代碼
#include <LiquidCrystal.h>
LiquidCrystal lcd(52, 50, 48, 46, 44, 42);
int byteRead;
void setup()
{
Serial.begin(9600);
Serial1.begin(9600); //INTIALISING THE SERIAL PORT
lcd.begin(16, 2);
}
void loop()
{
**this is listing to print data string to Serial**
dataRaspi = "$" + data_yaw + "|" + data_pitch + "|" + data_roll + "|" + data_lat + "|" + data_lon + "|" + data_airSpd + "|" + data_alt_qnh + "#";
Serial.println(dataRaspi);
delay(1);
**this is listing to read data from Serial1**
if(Serial1.available())
{
while(Serial1.available < 0)
byteRead = Serial1.read;
lcd.print(byteRead);
}
問題是...
我的液晶有空白,如果我給了一系列的字符串輸入到SERIAL1像 「QWERTY」。如何顯示從serial1到我的液晶顯示器的結果?