Dear All,
I used this tutorial to connect the LCD16x2 . I already had it working.
I wanted to try some other stuff so I connected everything again as descibed in the tutorial. I was not able to succesfully finish the "Hello World" - example, so I thought something was wrong with my display or Arduino. I build the setup again with other components but same story.
When I tried to code below ( to test the characters) it was working! :o
What am I missing to complete the simple "Hello World" - example?
#include <LiquidCrystal.h>
//LiquidCrystal(RS, E, D4, D5, D6, D7)
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
byte customChar[8] = {
0b00110,
0b01001,
0b01001,
0b00110,
0b00000,
0b00000,
0b00000,
0b00000
};
int row = 0;
int col = 0;
void setup()
{
lcd.createChar(0, customChar);
lcd.begin(16, 2);
}
void loop() {
// column (0-15), row (0-1)
lcd.setCursor(col, row);
lcd.write((uint8_t)0);
delay(100);
lcd.clear();
if (col < 15) {
col = col +1;
}
else {
if (row < 1) {
row = row +1;
col = 0;
}
else {
row = 0;
col = 0;
}
}
// delay(500);
}