#include "Lab5_E4.h"
void setup() {
DDRD = 11111111; // Output = 1, Input = 0
DDRB = 00111111;
//void LAB5_E3();
Serial.begin(9600);
Serial.println("READY");
delay(800);
}
void loop() {
LAB5_E4 LCD;
LCD.INIT(); // run initializing code from .h file
LCD.DATA('K');delay(250);
LCD.DATA('Y');delay(250);
LCD.DATA('L');delay(250);
LCD.DATA('I');delay(250);
LCD.DATA('E');delay(250);
LCD.DATA(' ');delay(250);
LCD.DATA('P');delay(250);
//LCD.CMD(0xc0);delay(250); // move cursor to second ling
//LCD.STR("it works!");delay(500); // test print a string
while(1) {
if (Serial.available()) {
LCD.CMD(0xC0);delay(500); // move cursor to second line
String DATA=Serial.readStringUntil('\n'); // read serial until carraige return
Serial.println(DATA);delay(500);
LCD.STR(DATA);delay(500);
}
}
while(1);
}