Android GPIO working

I managed to get digital input with Android.

There is a little mistake on Access GPIO Uasge | Khadas Documentation

PIN37 is not GPIOH5, but GPIOH4, therefore we must check for 431 and not 432

So, for INPUT you can just do:

  1. adb shell
  2. su
  3. echo 431 > /sys/class/gpio/export
  4. echo in > /sys/class/gpio/gpio431/direction
  5. Here you can try testing with pin 37 and a 3v3 pin, let’s say pin 20, to see the digital input:
    echo in > /sys/class/gpio/gpio431/direction

I didn’t tested as output but it should work pretty much the same as long as you change 432 for 431.