// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis()/1000);
}
Instead of "Hello, world" it prints different characters on the screen.
For instance, instead of the two "o" characters in "hellO" and "wOrld" it prints twice the character "ö".
Line 2 shows the seconds till arduino had started.
It displays the following:
0 --> 1 --> 2 --> 3 ---> < (instead of "4") --> = (instead of "4") ....
look at page 11 of the PDF mentioned earlier and you will see it is bit 8 that transforms the o into ö the 4 and the < was bit 4 ==> so the same line (4 bit communication) ==> it is 99% sure line 5 .