How to control the GPIO using python in Banana Pi Zero?

(Ram) #1

Hi All

I am trying to turn on a small led using python script.

As we do in Raspberry Pi- Code —> import time import RPi.GPIO as GPIO

========== I have the problem with
import RPi.GPIO as GPIO
How I will write for the BPI zero.


(ZB) #2

Hello, We have built-in some commands in image, could you find “” in “/usr/local/bin”?

(Ram) #3

Hi Thanks for your response.

I have not found any .py file in /usr/loca/bin

Here is the output…

so can you send me small python code for led on and off with importing headers file and all.


(ZB) #4

Hello,you can see here :

find example in test directory.

(berbec) #5

For those who find the above RPi.GPIO library, i’ve had issues

Building the library requires a file called “” which lets the library identify which Banana is in use. This file does not exist on any image I have downloaded. I would really like to find this file

(ZB) #6

Hello, try this way please, the install method is same with M3: