trying to work with the guide and installing the Python GPIO I get this error:
root@bpi-iot-ros-ai:/home/pi/RPi.GPIO_BP/test# python led.py
Traceback (most recent call last):
File “led.py”, line 2, in
import RPi.GPIO as GPIO
File “/usr/lib/python2.7/dist-packages/RPi/GPIO/init.py”, line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
there is no bpi_test_g40.py there is g40.py and this gives:
root@bpi-iot-ros-ai:/usr/local/bin# python g40.py
Traceback (most recent call last):
File “g40.py”, line 2, in
import RPi.GPIO as GPIO
File “/usr/lib/python2.7/dist-packages/RPi/GPIO/init.py”, line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
What can be done?
Didnt find much info in the internet.
It’s been months since you post your question, and yet no one answer.
You might get it done already.
For someone who still struggling to make RPi.GPIO working on P2Z
here’s what I have tried:
Download and compiled from here
I also have an issue with this. I have installed WiringPi and RPi.GPIO from Sinovoip’s github. WiringPi works, but I get the following when I run the test script.
(oprint) pi@OctoPrint:~/oprint/lib/python2.7/site-packages/RPi.GPIO/test$ sudo ./g40.py
[sudo] password for pi:
BPI: gpioLayout(21)
BPI: name[bpi-m1] gpioLayout(21)
Pi Board Information
---------------------
P1_REVISION => 3
RAM => 1024MB
REVISION => 4001
TYPE => Banana Pi M1[A20]
PROCESSOR => Allwinner
MANUFACTURER => BPI-Sinovoip
Is this board info correct (y/n) ? y
8 GPIO.setup GPIO.OUT
enter to sunxi_setup
sunxi_gpio_function
sunxi_setup_gpio
sunxi_set_pullupdn
Segmentation fault
Sorry I was answering about other module that I have, I use:
Linux bpi-iot-ros-ai 3.4.113-BPI-M2Z-Kernel #1 SMP PREEMPT Mon Aug 13 14:48:42 CST 2018 armv7l armv7l armv7l GNU/Linux
I didnt recover from this problem:
root@bpi-iot-ros-ai:~/RPi.GPIO/test# python g40.py
Traceback (most recent call last):
File “g40.py”, line 2, in
import RPi.GPIO as GPIO
File “/usr/lib/python2.7/dist-packages/RPi/GPIO/init.py”, line 23, in
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
Try to use this one, I think this works
The support from bananaPI team is the bad… they create modules but forget to get them working… what can we do with a hardware that cannot work??