#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 6, 7, 8, 9);
char inByte = 0;
void setup() {
pinMode(5, INPUT); // This is the frequency input pinMode(10, OUTPUT); // Backlight control pin digitalWrite(10, HIGH); // Turn backlight on lcd.begin(16, 2); Serial.begin(115200); // Print a splash screen to the LCD. lcd.print("Serial Display"); lcd.setCursor(1, 3); lcd.print("By Dmitry"); delay(2000); lcd.clear(); lcd.print("Ready to "); lcd.setCursor(1, 3); lcd.print("accept data");
}
void loop() {
if(Serial.available() > 0) { inByte = Serial.read(); if(inByte == '-') //type "-" symbol to erase the lcd { lcd.clear(); } else if(inByte == '=') //"=" symbol is equivalent to "Enter" { lcd.setCursor(0, 1); } else { lcd.print(inByte); } }
}