LCD (I2C) as an serial monitor.
goodday all, i have question little project i'm making school. i'm starting user, , ive got little background programming , building cerquit boards. what project?: i want put output of optical senor (i can read out on serial monitor) on lcd i2c chip. this code ive got far. code: [select] #include <wire.h> #include <liquidcrystal_i2c.h> liquidcrystal_i2c lcd(0x27,16,2); const int led = 13; int tcrt; void setup(){ // set lcd's number of columns , rows: lcd.init(); lcd.backlight(); // initialize serial communications: serial.begin(9600); pinmode (led, output); } void loop(){ tcrt = analogread(a0); serial.println(tcrt); analogwrite(led, tcrt/4); // when characters arrive on serial port... if (serial.available()) { // wait bit entire message arrive delay(100); // clear screen lcd.clear(); // read availab...