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:
- adb shell
- su
- echo 431 > /sys/class/gpio/export
- echo in > /sys/class/gpio/gpio431/direction
- 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.