Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troubleshoot

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troubleshoot

Post by betterburnout »

Hello from Paris france !

A member of the forum kindly suggested me to create a new post about my problem,
because his post was solved. Sorry if I double it.

I followed yesterday night the tutorial to solder and install on the Raspberry Pi B the Adafruit RGB Negative 16x2 LCD.
To my surprise and delight, I was damn happy, the LCD screen lighted.
After running the python script
sudo python Adafruit_CharLCD.py
I pushed the buttons to get the different colors… It worked.
Now this morning, running again the python script… I get an error message :
Runtimewarning : This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
self.GPIO.setup(self.pin_e,GPIO.OUT)
I don't have the faintest idea of what I can do.

Maybe is it because I didn't properly shut down the LCD screen before turning off the Raspberry Pi ? ( don't know how to proceed ). I just hope I didnt' break anything…

Thank you if you can help me. All the best. Raphaël.

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

I'm noticing this strange pattern on the screen. Which I didn't have yesterday :/
Attachments
photo.JPG
photo.JPG (670.74 KiB) Viewed 770 times

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

Just in case of here are the front and back of the plate.
Attachments
photo 1.JPG
photo 1.JPG (813.1 KiB) Viewed 767 times
photo 2.JPG
photo 2.JPG (690.8 KiB) Viewed 767 times

User avatar
JackyNiew
 
Posts: 33
Joined: Wed Jun 04, 2014 9:34 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by JackyNiew »

Re! Raphaël,

Rick à déplacé la conversation.

Je te répète n'hésite pas à me tenir au courant. Il n'y a pas de raison cela doit fonctionner.

A+
Jacky

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

Hello Again,
really sorry to bother but my LCD looks completely shut down to my noob expertise.
I need desperately heeelp.
Thank you.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by adafruit_support_mike »

Your soldering looks good.

The error messages you got probably happened because you shut down a script that used the LCD without telling the OS it was done using that address. Just use the suggested line to disable the warnings.

WRT the odd display pattern, it's possible that some noise in the signal lines interfered with the signals going to it. Try disconnecting it from your RasPi, rebooting, then connecting it again.

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

Hello Mike ! Thank your for helping.
Sorry to ask that… But you have to help me from the ground to land this plane.
How do I "use" the suggested line… Do I have to use one of these in Terminal ?
GPIO.setwarnings(False) to disable warnings. self.GPIO.setup(self.pin_e,GPIO.OUT)
Or edit a file…
Thank you for your patience.
Raphaël.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by adafruit_support_mike »

Add that line to the beginning of the Python script.

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

HelloOo. SIgh.
I copied the Python filed. Edited it right right in the beginning ( on top, before comments ) as suggested,
but nothing changes. The screen doesn't respond, even after rebooting, unplugging the LCD screen…
I still have those 16 LCD blocks on top of the screen.
The LCD is keeping in its memory the mistake I've committed.

I tried several other positions in the pyrthon file, without success.
Can't figure out where exactly put

Code: Select all

GPIO.setwarnings(False)
:/

This is an extract of the file :

Code: Select all

#!/usr/bin/python

#
# based on code from lrvick and LiquidCrystal
# lrvic - https://github.com/lrvick/raspi-hd44780/blob/master/hd44780.py
# LiquidCrystal - https://github.com/arduino/Arduino/blob/master/libraries/LiquidCrystal/LiquidCrystal.cpp
#


from time import sleep

class Adafruit_CharLCD:

    # commands
    LCD_CLEARDISPLAY            = 0x01
    LCD_RETURNHOME              = 0x02
    LCD_ENTRYMODESET            = 0x04
    LCD_DISPLAYCONTROL          = 0x08
    LCD_CURSORSHIFT             = 0x10
    LCD_FUNCTIONSET             = 0x20
    LCD_SETCGRAMADDR            = 0x40
    LCD_SETDDRAMADDR            = 0x80

    # flags for display entry mode
    LCD_ENTRYRIGHT              = 0x00
    LCD_ENTRYLEFT               = 0x02
    LCD_ENTRYSHIFTINCREMENT     = 0x01
    LCD_ENTRYSHIFTDECREMENT     = 0x00

    # flags for display on/off control
    LCD_DISPLAYON               = 0x04
    LCD_DISPLAYOFF              = 0x00
    LCD_CURSORON                = 0x02
    LCD_CURSOROFF               = 0x00
    LCD_BLINKON                 = 0x01
    LCD_BLINKOFF                = 0x00

    # flags for display/cursor shift
    LCD_DISPLAYMOVE             = 0x08
    LCD_CURSORMOVE              = 0x00

    # flags for display/cursor shift
    LCD_DISPLAYMOVE             = 0x08
    LCD_CURSORMOVE              = 0x00
    LCD_MOVERIGHT               = 0x04
    LCD_MOVELEFT                = 0x00

    # flags for function set
    LCD_8BITMODE                = 0x10
    LCD_4BITMODE                = 0x00
    LCD_2LINE                   = 0x08
    LCD_1LINE                   = 0x00
    LCD_5x10DOTS                = 0x04
    LCD_5x8DOTS                 = 0x00



    def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, 21, 22], GPIO = None):
        # Emulate the old behavior of using RPi.GPIO if we haven't been given
        # an explicit GPIO interface to use
        if not GPIO:
            import RPi.GPIO as GPIO
        self.GPIO = GPIO
        self.pin_rs = pin_rs
        self.pin_e = pin_e
        self.pins_db = pins_db

        self.GPIO.setmode(GPIO.BCM)
        self.GPIO.setup(self.pin_e, GPIO.OUT)
        self.GPIO.setup(self.pin_rs, GPIO.OUT)

        for pin in self.pins_db:
            self.GPIO.setup(pin, GPIO.OUT)

        self.write4bits(0x33) # initialization
        self.write4bits(0x32) # initialization
        self.write4bits(0x28) # 2 line 5x7 matrix
        self.write4bits(0x0C) # turn cursor off 0x0E to enable cursor
        self.write4bits(0x06) # shift cursor right

        ( etc… )

Attachments
the strange 16 LCD blocks on top of the screen…
the strange 16 LCD blocks on top of the screen…
file.jpg (459.34 KiB) Viewed 669 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by adafruit_support_mike »

It sounds like you may have a hardware problem.

The two most likely points of failure are the MCP23107 which passes information from the RasPi to the LCD, and the RasPi itself.

Do you happen to have another RasPi, or another I2C device we could use to isolate the problem?

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

( Thanks for your help ) Yes I do have another one, just have to take the case off.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by adafruit_support_mike »

Okay.. try moving the LCD over to the other RasPi and see if you get the same behavior there.

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

Hello Mike.
Just plugged the LCD on the other Raspberry Pi. Which runs XMBC…
After booting, the LCD displays exactly the same pattern :/

Noob question : does the LCD is able to keep in memory the python command it received before ? Is there a way to wipe out its memory ?
Thank you for your help.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by adafruit_support_mike »

The LCD doesn't have any memory, and it sounds like there's a hardware problem with the one you have now.

Send a note to [email protected] with a link to this thread and the folks there will get you a new LCD plate.

User avatar
betterburnout
 
Posts: 16
Joined: Mon Jul 29, 2013 3:08 am

Re: Raspberry Pi + Adafruit RGB 16x2 LCD suddenly troublesh

Post by betterburnout »

Thank you Mik for your help.
Cheers.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”