2 安装RPi.GPIO_BP
官网的安装过程(不需操作,操作下面的)
1. sudo apt-get update2. sudo apt-get install python-dev ==> I just try python 2.7.x, did not try 3.x.x3. cd RPi.GPIO_BP4. python setup.py install ===> Attention: do this step for /build folder is the user permission not root permission5. sudo python setup.py install ==> generate GPIO.so
修正(操作这里)
pi@bananapi:~$ sudo apt-get update
pi@bananapi:~$ sudo apt-get install python-dev
pi@bananapi:~$ cd RPi.GPIO_BP-master
pi@bananapi:~$ python setup.py installpi
3 运行
pi@bananapi:~$ ls /sys/class/gpio/
显示export gpiochip1 unexport
4 运行
pi@bananapi:~$ cd RPi.GPIO_BP-master/test/
为led.py加上可执行权限(如果没显示可执行权限)
pi@bananapi:~/RPi.GPIO_BP-master/test$ chmod +x led.py