RGB LCD Plate not working with Pi2

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
JasonWDY8
 
Posts: 5
Joined: Mon Sep 14, 2015 3:16 pm

RGB LCD Plate not working with Pi2

Post by JasonWDY8 »

Hi Everyone,

Please forgive my ignorance. I'm fairly new to the Pi stuff and Linux in general.

Had a RGB LCD plate working fine on a Raspberry Pi Model B. I've cloned the SD card and got that running with the Pi 2 no problem. I then installed the Adafruit RGB LCD Plate.

The issue I have now is that if I run any LCD related code, including the Adafruit example I get the following error message: -

pi@stourbridgewx:~/Adafruit_Python_CharLCD/examples$ sudo python char_lcd_rgb.py
Traceback (most recent call last):
File "char_lcd_rgb.py", line 6, in <module>
import Adafruit_CharLCD as LCD
File "/usr/local/lib/python2.7/dist-packages/Adafruit_CharLCD-1.0.0-py2.7.egg/Adafruit_CharLCD/__init__.py", line 1, in <module>
from Adafruit_CharLCD import *
File "/usr/local/lib/python2.7/dist-packages/Adafruit_CharLCD-1.0.0-py2.7.egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 89, in <module>
class Adafruit_CharLCD(object):
File "/usr/local/lib/python2.7/dist-packages/Adafruit_CharLCD-1.0.0-py2.7.egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 95, in Adafruit_CharLCD
gpio=GPIO.get_platform_gpio(),
File "/usr/local/lib/python2.7/dist-packages/Adafruit_GPIO-0.7.1-py2.7.egg/Adafruit_GPIO/GPIO.py", line 321, in get_platform_gpio
import Adafruit_BBIO.GPIO
ImportError: No module named Adafruit_BBIO.GPIO


I think the file it's looking for is BeagleBone related? Not sure why this is happening?

Have removed the Adafruit directory, rebooted, re-installed Adafruit code, rebooted again and still no joy.

Any pointers/links to information gratefully received,

Cheers,

Jason

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

Re: RGB LCD Plate not working with Pi2

Post by adafruit_support_mike »

Just to check, what steps did you use to install the code?

User avatar
JasonWDY8
 
Posts: 5
Joined: Mon Sep 14, 2015 3:16 pm

Re: RGB LCD Plate not working with Pi2

Post by JasonWDY8 »

Hi,

Thanks for the reply.

Have followed the instructions here: https://learn.adafruit.com/adafruit-16x ... y-pi/usage.

I2C is enabled as it responds to sudo i2cdetect -y 1


Cheers,

Jason

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

Re: RGB LCD Plate not working with Pi2

Post by adafruit_support_mike »

Thank you. There are a couple of different libraries and about three ways to install each.

In this case it looks like the code is failing to identify the device properly. We use the same code for several different platforms, and there's a function all the way at the end which loads the appropriate IO library. Yours seems to be trying to load the BBB library in spite of running on a RasPi.

Let me check with the developers and see if they know what's going on.

As an additional piece of information, what OS report does the RasPi give you when you log in?

User avatar
tdicola
 
Posts: 1074
Joined: Thu Oct 17, 2013 9:11 pm

Re: RGB LCD Plate not working with Pi2

Post by tdicola »

Huh that is odd that you're getting a BeagleBone Black GPIO adapter. The code will check /proc/cpuinfo to see the hardware type and if it finds the pi (a Hardware: BCM2708 or 2709 line) then it uses the Pi GPIO, otherwise it checks for the BeagleBone Black and other platforms. Can you run this command and grab the output to help debug?

Code: Select all

cat /proc/cpuinfo
Also just to check are you using the latest Raspbian OS image from https://www.raspberrypi.org/downloads/raspbian/ or a different OS? If you're not using the latest Raspbian make sure to upgrade to their 5-5-2015 image just to rule out any issues there. Thanks!

User avatar
JasonWDY8
 
Posts: 5
Joined: Mon Sep 14, 2015 3:16 pm

Re: RGB LCD Plate not working with Pi2

Post by JasonWDY8 »

Hi,

Thanks for the reply. Here's the info you requested: -

pi@stourbridgewx:~$ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5

processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5

processor : 2
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5

processor : 3
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5

Hardware : BCM2709
Revision : a01041
Serial : 00000000fc3f259e


Cheers,

Jason

User avatar
JasonWDY8
 
Posts: 5
Joined: Mon Sep 14, 2015 3:16 pm

Re: RGB LCD Plate not working with Pi2

Post by JasonWDY8 »

Hello again.

Is there anything else I can try other than starting from a fresh Raspbian install please?

e.g. is there a procedure I can follow to remove the Adafruit LCD char library completely and reinstall it from scratch to make sure it's picking up the correct references/dependencies please?


Cheers,

Jason


PS Have run sudo apt-get update and sudo apt-get upgrade to bring things up to to date. This does not fix this issue.

User avatar
JasonWDY8
 
Posts: 5
Joined: Mon Sep 14, 2015 3:16 pm

Re: RGB LCD Plate not working with Pi2

Post by JasonWDY8 »

I've fixed this now. This is the procedure I followed: -

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rm -r /usr/local/lib/python2.7/dist-packages/Adafruit_CharLCD-1.0.0-py2.7.egg
sudo rm -r /usr/local/lib/python2.7/dist-packages/Adafruit_GPIO-0.7.1-py2.7.egg
cd Adafruit_Python_CharLCD
sudo python setup.py install
cd examples
sudo python char_lcd_plate.py


And the example runs!!!

Thanks to everyone who has chipped in. Really appreciate your help and patience with my ignorance.

Cheers,

Jason

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

Re: RGB LCD Plate not working with Pi2

Post by adafruit_support_mike »

Glad to hear it's working for you.

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”