Problem with LCD Tutorial GPIO

Talk about Adafruit Raspberry Pi® accessories!

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/

Problem with LCD Tutorial GPIO

Postby slibutti » 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: 4
Joined: Sat Dec 29, 2012 4:46 pm

Re: Problem with LCD Tutorial GPIO

Postby adafruit_support_rick » 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: 2905
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: Problem with LCD Tutorial GPIO

Postby slibutti » 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: 4
Joined: Sat Dec 29, 2012 4:46 pm


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 1 guest

Stuff to buy from the Adafruit store and links to product documentation!


New Products [106]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]