hey all,
I have been trying to use a LCD display with my arduino Uno, but I keep getting strange results like random characters and white boxes to display. i don’t have a schematic, but so far I have the screen pins connected to the arduino pin as follows: VSS to ground, VDD to +5V, VO to ground via a 5K potentiometer, RS to 12, RS to ground, E to ground, D4 to 5, D5 to 4, D6 to 3, D7 to 2, A to +5v and K to ground. Oh, and all the pins I am using are digital pins, not analog pins.
I understand that the white boxes appear to signify that the screen is on, but I still do t understand the strange characters.
I’m just trying to print something basic for the moment, here is by code:
Why would you want to print to the screen 10,000 times per second? The usual approach is to print only when a displayed value changes. That way the processor can do other, more interesting things.
Yeah good point, the code was mostly just meant to test to screen and see if it would display anything. Unfortunately no luck running the code you posted, it just prints the white boxes again
There’s a bit of my original question that states all of the connections to the arduino from the LCD, is that ok? I’m cool to make a schematic though if you need
None of the LCD libraries support the println() function. That is why the extra characters with 4 lines are showing. Only use print() and control cursor position with the setCursor() function.
The 4 line characters are because the LCD cannot print the line feed and carriage return characters that println() sends.
If you do go with the IC2 enabled LCD use the hd44780 library instead of the LiquidCrystal_I2C libraries. It makes using those LCDs much easier by auto detecting I2C address and LCD to I2C backpack pin mapping.