Hi,
I've been trying to debug my code to print custom characters in 16X2 LCD, and after a day of work trying to compare to the smiley example (which works) with my code, I pinpointed the problem to one pixel.
I started changing bit by bit of the first row, from 0 to 1, compiling every time, until the smiley stopped printing.
The culprit is bit[1] of the top row in smiley definition. Make it 0, it all compiles and and a smiley is printed. Make it 1 and it compiles but nothing is printed.
Below is the full code. I don't have another LCD module to test. Can anyone reproduce the problem?
I took the examples as is from this Arduino site.
I didn't post the whole code because it's dirty with failed attempts commented out, but what I posted is the whole working code, except for the final closing bracket that I missed pasting.
Note how the example has " lcd.begin(16, 2);" where you have " lcd.setCursor(3, 2);", which, by the way, is trying to display on the third line?!? Undo that change and you will find that it works much better.
Hi John,
thanks for your reply.
I eliminated the lcd.begin because it blanks the screen. I found it empirically but later found an explanation in the forum.
Set cursor (3,2) I think it's Position 3, line 2. Even if I'm wrong, I've tried all kind of positions.
After all the tests, I downed it to 1 bit (pixel), that if I set it, it doesn't print anything, and if clear it, the char is printed. Tried it many times and the behavior is consistent.
Anyway, I'm leaving this project because I think the 16X2 LCD is not the right HW to display different alphabets, and it's futile to "convince it" with SW tricks.
Thanks again for your help.
David.