How to test GPIO pins on Android

To test GPIO on Android with your newly acquired BPI-M64

Prepare the test LED by following the pic below:

Red connect to PB0 (pin 8)

Black connect to GND (pin 6)


1,connect the microUSB OTG cable to your PC.

2,power up and wait till it boot into the Android Welcome screen.

3, make sure you are connected and have proper full access to the device by following the adb commands below:

adb devices
adb root
adb remount
adb shell

4, after inside the shell type the following and press enter:

setenforce 0

5, connect the LED like in the picture. always connect the GND(black) first,

6, type the following and enter, the LED will power on and light up:

echo 1 > /sys/class/gpio_sw/PB0/data

7, to power off

echo 0 > /sys/class/gpio_sw/PB0/data

results matching ""

    No results matching ""