This is my current program:
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
char prevValue;
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.setCursor(0,0);
}
void loop() {
if (Serial.available() > 0) {
char value = Serial.read();
if (prevValue != value){
lcd.clear();
prevValue = value;
}
Serial.println(prevValue);
lcd.print(prevValue);
}
}
When you type in any char in the serial monitor, it will print it on my LCD screen.
Now I want to make it read an entire string. Also, the part of my program that listens for a new char to change the screen will not work if the inputted char is the same as the previous one. Any suggestions/help?