16x2 LCD Displays Random Characters
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

16x2 LCD Displays Random Characters

by Chrisski3 on Sun Jan 07, 2018 3:29 am


I recently followed the Adafuit instructions for wiring up a 16x2 LCD and printing statements/info to the LCD.
I was able to successfully wire, and display text on the LCD, but the text eventually starts getting corrupted.

I printed the single statement "Test Message" and saw it clearly for 2 seconds (which is how long the program runs the message for before "Clearing" the display and running again.)
IMG_20180107_021217.jpg (350.21 KiB) Viewed 36 times

However, after the 2 seconds, I now see "cggvgsv"ogsscggv" displayed.
IMG_20180107_021514.jpg (573.59 KiB) Viewed 36 times

I'm using an RPi Zero W. Here is the code I am using:
Code: Select all | TOGGLE FULL SIZE
from Adafruit_CharLCD import Adafruit_CharLCD
from subprocess import *
from time import sleep, strftime
from datetime import datetime

# pin configuration and 16x2 setup. Pin numbers are (BCM)
lcd_rs        = 25 
lcd_en        = 24
lcd_d4        = 23
lcd_d5        = 17
lcd_d6        = 21
lcd_d7        = 22
#0=Off, 4=On
lcd_backlight = 4
lcd_columns   = 16
lcd_rows      = 2

# Initialize the display and begin
lcd = Adafruit_CharLCD(lcd_rs, lcd_en, lcd_d4, lcd_d5, lcd_d6, lcd_d7, lcd_columns, lcd_rows, lcd_backlight)

while True:
        lcd.message("Test Message")

Posts: 2
Joined: Tue Jan 19, 2016 9:38 pm

Please be positive and constructive with your questions and comments.