I am wanting to make my new LCD print what I say via serial monitor... So far I have this...
#include <LiquidCrystal.h>
int incomingByte = 0; // for incoming serial data
String ReadString;
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
}
void loop() {
if (Serial.available() > 0) {
char c = Serial.read();
ReadString += c;
if(ReadString.indexOf('~') > 0) {
ReadString = "";
Serial.println("Cleared String");
lcd.clear();
}
Serial.print("I received: ");
Serial.println(ReadString);
lcd.print(ReadString);
}
}
}
If you type lol it returns
I received: l
I received: lo
I received: lol
and on the LCD it prints
llolol
Does anyone know of a way to get it just to put the full word?
(sorry I am new to this type of programming!)