avafinger / bananapi-zero-ubuntu-base-minimal

BananaPi M2 Zero - Ubuntu Focal Base Minimal Image (Experimental) - U-Boot 2017.09 / Kernel 4.18.y / Kernel 4.19.y / Kernel 4.20.y / Kernel 5.3.y / Kernel 5.6.y / Kernel 5.7.y / Kernel 5.11.y
88 stars 17 forks source link

WiringPi2 + RPi.GPIO updated guide? #42

Open gavan1 opened 4 years ago

gavan1 commented 4 years ago

I've been following the Getting_Started_with_M2_Zero guide on BPI wiki.

RPi.GPIO

Execute "git clone https://github.com/BPI-SINOVOIP/RPi.GPIO" after clone the repo, cd RPi,GPIO Execute "sudo apt-get update" Execute "sudo apt-get install python-dev python3-dev" Execute "sudo python setup.py install" or "sudo python3 setup.py install" to install the module

Using RPi.GPIO cd /usr/local/bin Execute "./bpi_test_g40.py" to test RPi.GPIO

I am assuming that ./bpi_test_g40.py file is missing and is part of the BPI images?

running a any file in the test folder gives RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi!

Also tried LeMaker version, but got the above error.

Both libraries setup.py scripts do build and add the modules to the /usr/local/lib/python2.7/dist-packages as for WiringPi2

gpio readall
Unable to determine hardware version. I see: Hardware   : Allwinner sun8i Family
,
 - expecting BCM2708, BCM2709 or BCM2835.
If this is a genuine Raspberry Pi then please report this
to projects@drogon.net. If this is not a Raspberry Pi then you
are on your own as wiringPi is designed to support the
Raspberry Pi ONLY.

This might just be a kernel issue (using the latest Kernel 5.6.13 Server)?

Does anyone have RPi.GPIO working on other 19.10 images? Please add the steps here. @avafinger I think it would be great for the community to have the steps in the main readme.

avafinger commented 4 years ago

@avafinger I think it would be great for the community to have the steps in the main readme.

It is already there: http://forum.banana-pi.org/t/banana-pi-m2-zero-wiringpi2/5517/6