Gast
#2857831
Hallo,
Ich möchte an meinem Arduino eine Eingabe über Serial Monitor auf das
Display geben. Was auch Funktioniert allerdings nur in der ersten Zeile
wie bringe ich dem bei das er nach 16 Zeilen und die 2. reihe rutschen
soll
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
void setup(){
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// initialize the serial communications:
Serial.begin(9600);
}
void loop()
{
// when characters arrive over the serial port...
if (Serial.available()) {
// wait a bit for the entire message to arrive
delay(100);
// clear the screen
lcd.clear();
// read all the available characters
while (Serial.available() > 0) {
// display each character to the LCD
lcd.write(Serial.read());
}
}
}