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)
then…
-
connect the microUSB OTG cable to your PC.
-
power up and wait till it boot into the Android Welcome screen.
-
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 -
after inside the shell type the following and press enter:
setenforce 0
-
connect the LED like in the picture. always connect the GND(black) first,
-
type the following and enter, the LED will power on and light up:
echo 1 > /sys/class/gpio_sw/PB0/data
-
to power off
echo 0 > /sys/class/gpio_sw/PB0/data