root@BPI-M2:~# python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
import RPi.GPIO as gpio
Traceback (most recent call last):
File “”, line 1, in
RuntimeError: This module can only be run on a Raspberry Pi!
os:respbian v4 hdmi
python还有gpio模块都是系统自带的
bpi m2跟树莓派的gpio是兼容的吧?