Question say it all.
How do I fix this? I need an updated .pyc with corrects made for the new pin outs. Where can I find an updated copy for rev2 board?
Question say it all.
How do I fix this? I need an updated .pyc with corrects made for the new pin outs. Where can I find an updated copy for rev2 board?
Hi - is this the Python code from Adafruit that you are using?
https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_CharLCD
I see it referenced on the character LCD tutorial:
http://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi/overview
I've not tried it out myself yet so don't have any particular insight. However, I think a good way to get help would be to raise a issue in that GitHub repo:
https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/issues
Drew Fustini wrote:
Hi - is this the Python code from Adafruit that you are using?
https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/tree/master/Adafruit_CharLCD
I see it referenced on the character LCD tutorial:
http://learn.adafruit.com/drive-a-16x2-lcd-directly-with-a-raspberry-pi/overview
I've not tried it out myself yet so don't have any particular insight. However, I think a good way to get help would be to raise a issue in that GitHub repo:
https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/issues
Yes I am talking about the Python code referenced in the Tutorial.
Sure, I can raise an issue, but I think I need to get some more info first. Do you mean that you believe Adafruit-Raspberry-Pi-Python-Code/Adafruit_CharLCD/Adafruit_CharLCD.py is out of date and does not work?
My understanding of and experience with the 512MB Rev 2.0 Pi is that the P1 GPIO header (which the Pi Cobbler uses) is unchanged. I've not noticed any differences switching between old and new Pi's in my own projects. I'm going to try to wire up a 16x2 LCD on a breadboard with the Pi Cobbler like in the tutorial. I've got Rev 1.0, Rev 1.0 + ECN0001, and 512MB Rev 2.0 Pi's so I can check if I experience any difference.
Sounds good. I an am pritty sure that I have wired it correctly because I got "???????????????" Accross the display. I think it has something to do with the change involving GPIO21 and GPIO27. That would be the only change that could affect it.
Problem found. It is exactly what I thought...
I think it has something to do with the change involving GPIO21 and GPIO27. That would be the only change that could affect it.
Before I tested with 512mb RPi, I did a test with my old rev1 board. = PASS
Anyway, I found this out by connecting the 4th pin from the right to the pin 11 on the camera connector and...WOOH! It worked.
Now all we need to do is work out how to fix this issue by rewriting the .pyc file that adafruit has kindly provided for us.
Attached is the .pyc file along with some other files that they provide.
**ALERT**
Fixed the problem...
Change Line:
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):
Hope this helps someone and I hope that adafruit add in a checker for rev in updates of this software.
EDIT:
MUST ALSO DELETE .pyc FILE. The program will recompile itself.
Thanks for the advise and sharing the solution. I see I overlooked the pin change which you point out (under "JTAG Debug Support" on this page: http://www.raspberrypi.org/archives/1929).
I didn't get a chance to wire up a LCD last night, but I'm looking forward to doing that tonight and taking advantage of your fix.
Hi Fergus,
thank you, thank you, thank you for this....you saved my life.
yoe