#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,7,6,5,4);
void setup() {
// put your setup code here, to run once:
lcd.begin(16,2);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
if(Serial.available())
{
String s=Serial.readString();
lcd.print(s);
lcd.setCursor(0,0);
delay(5000);
}
}
/*
#include <LiquidCrystal.h>
const int rsPin = 12;
const int enPin = 11;
const int d4Pin = 5;
const int d5Pin = 4;
const int d6Pin = 3;
const int d7Pin = 2;
LiquidCrystal lcd(rsPin, enPin, d4Pin, d5Pin, d6Pin, d7Pin);
void setup() {
lcd.begin(16, 2);
lcd.print("hello world");
}
void loop() {
lcd.setCursor(0, 1);
int seconds = millis() / 1000;
int minutes = 0;
if (seconds >= 60) {
minutes = seconds / 60;
seconds -= minutes * 60;
}
if (minutes) {
lcd.print(minutes);
lcd.print(" ");
}
lcd.print(seconds);
}
*/