Problem with LCD Tutorial GPIO

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
slibutti
 
Posts: 5
Joined: Sat Dec 29, 2012 5:46 pm

Problem with LCD Tutorial GPIO

Post by slibutti »

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

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Problem with LCD Tutorial GPIO

Post by adafruit_support_rick »

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
slibutti
 
Posts: 5
Joined: Sat Dec 29, 2012 5:46 pm

Re: Problem with LCD Tutorial GPIO

Post by slibutti »

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

Steve

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”