Python RPi and GPIO on M5

Hello,

It looks like that the repository for RPGPIO doesn’t support bananapi m5

After installing, it gives: $ python3 import RPi.GPIO as GPIO BPI: gpioLayout(-1) Traceback (most recent call last): File “”, line 1, in File “/usr/local/lib/python3.8/dist-packages/RPi/GPIO/init.py”, line 23, in from RPi._GPIO import * RuntimeError: This module can only be run on a Raspberry Pi!

I see that there is support for other boards including M3:

Can you add support for M5 too ?

Thank you, Roberto

there is also no support for the m2-pro. T_T

please see here : https://wiki.banana-pi.org/Getting_Started_with_BPI-M5#RPi.GPIO

GPIO in python did’t work… How do I fix?

import RPi.GPIO as GPIO Traceback (most recent call last): File “”, line 1, in File “/usr/local/lib/python3.9/dist-packages/RPi.GPIO-0.7.1-py3.9-linux-aarch64.egg/RPi/GPIO/init.py”, line 23, in from RPi._GPIO import * ImportError: /usr/local/lib/python3.9/dist-packages/RPi.GPIO-0.7.1-py3.9-linux-aarch64.egg/RPi/_GPIO.cpython-39-aarch64-linux-gnu.so: undefined symbol: gpio_direction

Compiling RPi.GPIO as suggested here : https://wiki.banana-pi.org/Getting_Started_with_BPI-M5#RPi.GPIO just fails with a zillion ERRORS

RPi.GPIO-Amlogic/source/common.h:35: multiple definition of `pin_to_gpio_rev1’; build/temp.linux-aarch64-2.7/source/py_gpio.o:/home/*/RPi.GPIO-Amlogic/source/common.h:35: first defined here …