0

Adafruit LCD + Keypad:
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit LCD + Keypad:

by ltpitt on Wed May 17, 2017 6:27 pm

Hi there!

Very happy owner of this LCD + keypad:
https://www.adafruit.com/product/1110

Since a few days, if I start it, I get this error:
import Adafruit_CharLCD as LCD
File "build/bdist.linux-armv6l/egg/Adafruit_CharLCD/__init__.py", line 1, in <module>
File "build/bdist.linux-armv6l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 89, in <module>
File "build/bdist.linux-armv6l/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 95, in Adafruit_CharLCD
File "build/bdist.linux-armv6l/egg/Adafruit_GPIO/GPIO.py", line 426, in get_platform_gpio
RuntimeError: Could not determine platform.

I think this could be related to my last OS update (I use DietPi).

How can I fix the issue?

I saw on the github page that the code contained in GPIO.py simply understands if I use a Raspberry or a Beaglebone or other board.
I would like to tweak it in order to force Raspberry but...

Where is the file?

I cannot find it anywhere...

Or, clearly, if there is a better solution I'd be very happy.

Also if I can help with any diagnostic data please let me know what you need.

Thanks!

ltpitt
 
Posts: 68
Joined: Thu Jan 03, 2013 5:22 am

Re: Adafruit LCD + Keypad:

by adafruit_support_rick on Thu May 18, 2017 9:48 am


adafruit_support_rick
 
Posts: 33530
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Adafruit LCD + Keypad:

by ltpitt on Thu May 18, 2017 10:49 am

Hi there and thanks for the help...

I cannot find the same file in my Raspberry Pi, I've already found the online repo.

ltpitt
 
Posts: 68
Joined: Thu Jan 03, 2013 5:22 am

Re: Adafruit LCD + Keypad:

by adafruit_support_rick on Thu May 18, 2017 1:22 pm

cd to /usr/local/lib and enter the command find -name "GPIO.py"

adafruit_support_rick
 
Posts: 33530
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Adafruit LCD + Keypad:

by ltpitt on Fri May 19, 2017 6:39 pm

Here's the result:

HomeAssistant /usr/local # cd lib
HomeAssistant /usr/local/lib # find -name "GPIO.py"
./python3.4/dist-packages/WebIOPi-0.7.1-py3.4-linux-armv6l.egg/_webiopi/GPIO.py
HomeAssistant /usr/local/lib #

And then the file is not like the online one (7 rows, not of any use...)

ltpitt
 
Posts: 68
Joined: Thu Jan 03, 2013 5:22 am

Re: Adafruit LCD + Keypad:

by adafruit_support_rick on Sat May 20, 2017 9:34 am

That file has a different path than the one n the error message. Try going up to /usr/local and doing the find again. If necessary, go up to /usr until you find the right path

adafruit_support_rick
 
Posts: 33530
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Adafruit LCD + Keypad:

by ltpitt on Sat May 20, 2017 11:47 am

Thanks for the new input, Rick.

Sadly the result stays the same:
HomeAssistant /usr # find -name "GPIO.py"
./local/lib/python3.4/dist-packages/WebIOPi-0.7.1-py3.4-linux-armv6l.egg/_webiopi/GPIO.py
HomeAssistant /usr #

What could be wrong?

ltpitt
 
Posts: 68
Joined: Thu Jan 03, 2013 5:22 am

Re: Adafruit LCD + Keypad:

by adafruit_support_rick on Sat May 20, 2017 1:27 pm

Look for the folder "build" in root and then go from there

Also try sudo find

adafruit_support_rick
 
Posts: 33530
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Adafruit LCD + Keypad:

by ltpitt on Sun May 21, 2017 6:32 am

On my specific Raspbian distro (DietPi) I just have root user.

I really do not understand what could be wrong here.

How am I supposed to install Adafruit LCD library?

Maybe I am doing errors there?

ltpitt
 
Posts: 68
Joined: Thu Jan 03, 2013 5:22 am

Re: Adafruit LCD + Keypad:

by adafruit_support_rick on Sun May 21, 2017 9:05 am

To install, just follow the instructions here:
https://learn.adafruit.com/adafruit-16x ... ython-code

The easiest way to get the code onto your Pi is to hook up an Ethernet cable, and clone it directly using 'git', which is installed by default on most distros. Simply run the following commands from an appropriate location (ex. "/home/pi"):

sudo apt-get update
sudo apt-get install build-essential python-dev python-smbus python-pip git
sudo pip install RPi.GPIO
git clone https://github.com/adafruit/Adafruit_Python_CharLCD.git
cd Adafruit_Python_CharLCD
sudo python setup.py install

adafruit_support_rick
 
Posts: 33530
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.