User manual
The experiment requires the LCD basic writing that you set up
in the function test.
001 // Integrating LCD-Library
002 #include <LiquidCrystal.h>
003
004 // Specifying LCD pins
005 // RS, E, D4, D5, D6, D7
006 LiquidCrystal lcd(11, 10, 2, 3, 4, 5);
007
008 #define Backlight 9
009
010 byte Hour, Minute, Second;
011
012 void setup()
013 {
014 Serial.begin(9600);
015
016 analogWrite(Backlight, 200);
017
018 lcd.begin(16, 2);
019 lcd.clear();
020 lcd.setCursor(0, 0);
021 lcd.print("ARDUINO PC-CLOCK”);
022
023 Hour= 0;
024 Minute = 0;
025 Second= 0;
026 }
027
028 void loop()
029 {
030
031 if(Serial.available()>3)
032 {
033 Hour = Serial.read();
034 Minute = Serial.read();
035 Second = Serial.read();
036
037 lcd.setCursor(0, 1);
038 lcd.print("NOW: ");
039
040 if(Hour < 24)
041 {
042 if(Hour < 10) lcd.print("0");
043 lcd.print(Hour);