metachris / RPIO

RPIO is a GPIO toolbox for the Raspberry Pi.
https://pypi.python.org/pypi/RPIO
GNU Lesser General Public License v3.0
331 stars 147 forks source link

RuntimeError: This module can only be run on a Raspberry Pi! #117

Open aceboy2020 opened 4 years ago

aceboy2020 commented 4 years ago

I am using Kali linux arm in my raspberry pi 4. I install crowpi drivers because for me it is useful to learn in complete setup kit. After i execute example files in crowpi this error shows.

root@kali:~/CrowPi/Examples# sudo python buzzer.py Traceback (most recent call last): File "buzzer.py", line 5, 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!

And also this..

root@kali:~/CrowPi/Examples# sudo python lcd.py Traceback (most recent call last): File "lcd.py", line 6, in import Adafruit_CharLCD as LCD File "build/bdist.linux-aarch64/egg/Adafruit_CharLCD/init.py", line 1, in File "build/bdist.linux-aarch64/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 98, in File "build/bdist.linux-aarch64/egg/Adafruit_CharLCD/Adafruit_CharLCD.py", line 104, in Adafruit_CharLCD File "build/bdist.linux-aarch64/egg/Adafruit_GPIO/GPIO.py", line 429, in get_platform_gpio RuntimeError: Could not determine platform.

aceboy2020 commented 4 years ago

and also this

root@kali:~/CrowPi/Examples# sudo python matrix_demo.py Traceback (most recent call last): File "matrix_demo.py", line 40, in main(cascaded=1, block_orientation=90, rotate=0) File "matrix_demo.py", line 21, in main serial = spi(port=0, device=1, gpio=noop()) File "/usr/local/lib/python2.7/dist-packages/luma.core-1.12.0-py2.7.egg/luma/core/interface/serial.py", line 284, in init raise luma.core.error.DeviceNotFoundError('SPI device not found') luma.core.error.DeviceNotFoundError: SPI device not found

With the command lsmod I can see (vc_sm_cma 36864 1 bcm2835_mmal_vchiq)

Is this impossible for me to use Kali as an OS to execute crowpi modules/drivers? I bought crowpi because it has complete kit.. Such as matrix,lcd,breadboard,sensors,led and can be attach to raspberry 4. This is crowpi https://www.elecrow.com/pub/media/wysiwyg/new_products/crowpi_diagram_1.jpg

joan2937 commented 4 years ago

@aceboy2020 This is the repository for RPIO. You seem to be using RPi.GPIO.