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/

Problem with LCD Tutorial GPIO

by slibutti on Sat Dec 29, 2012 4:56 pm

I just completed the 'Drive a 16x2 LCD with the Raspberry Pi" tutorial. I constructed the cobbler and wired the board after setting up the LCD. When I connect to the Pi via the ribbon cable, the LCD glows and I can set the contrast.

I loaded all appropriate software via the instructions. When I run Adafruit_CharLCD.py I get the following error:



Adafruit_CharLCD.py:73: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
self.GPIO.setup(self.pin_e, GPIO.OUT)
Adafruit_CharLCD.py:77: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
self.GPIO.setup(pin, GPIO.OUT)


This error occurs whether or not the board is connected to the Pi. It seems it thinks the GPIO channel is already in use. When I disable the warning, nothing happens on the LCD.

Any help would be appreciated.

Steve
slibutti
 
Posts: 5
Joined: Sat Dec 29, 2012 4:46 pm

Re: Problem with LCD Tutorial GPIO

by adafruit_support_rick on Sun Dec 30, 2012 3:05 pm

Did you notice this part of the tutorial? Are you using a V2?

If you're using a Version 2 Raspberry Pi, pin #21 has been replaced with pin #27 so edit Adafruit_CharLCD.py and change:
def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, 21, 22], GPIO = None):
to
def __init__(self, pin_rs=25, pin_e=24, pins_db=[23, 17, 27, 22], GPIO = None):
User avatar
adafruit_support_rick
 
Posts: 10937
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: Problem with LCD Tutorial GPIO

by slibutti on Sun Dec 30, 2012 3:33 pm

Yes thanks I did. That change did nothing. Still get GPIO error that channels are in use.

Steve
slibutti
 
Posts: 5
Joined: Sat Dec 29, 2012 4:46 pm