Hi,
I recently purchased and assembled the Adafruit 16x2 LCD plate for the Raspberry Pi 3 (Raspbian Stretch). I followed the instructions from the Adafruit website and downloaded appropriate python packages including the Adafruit_Python_CharLCD package from GitHub. I have written a short python program which reads button presses from the plate and writes the name of the button to the LCD display (and to the console). For a short period of time the LCD display works well but after a minute or so the LCD displays garbage (not always alphanumeric characters) although the output to the console works appropriately. Initially the display will change, sometimes showing garbage and sometimes showing expected output but after a couple of minutes the display will be full of garbage and will be unchanging. At all times the output to the console is appropriate.
i2cdetect reports the following which seems ok:
pi@node0:~ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- pi@node0:~
The test program is straight forward and I’m sure it’s not the problem:
import Adafruit_CharLCD as LCD
lcd = LCD.Adafruit_CharLCDPlate()
lcd.message(‘Ready…’)
buttons = ((LCD.SELECT, ‘Select’, (1, 1, 1)),
(LCD.LEFT, ‘Left’, (1, 0, 0)),
(LCD.UP, ‘Up’, (0, 0, 1)),
(LCD.DOWN, ‘Down’, (0, 1, 0)),
(LCD.RIGHT, ‘Right’, (1, 0, 1)))
while True:
for button in buttons:
if lcd.is_pressed(button[0]):
lcd.clear()
lcd.message(button[1])
print button[1]
Not sure if this is a hardware problem or a problem with the Adafruit libraries. Any help would be appreciated.
Kevin