First of all you have to have root to use GPIO under Android.
In Android terminal go root:
Then, you make handler for GPIO port manually:
- echo 13 > /sys/class/gpio/export
Then you set GPIO mode on this pin to OUT (may be IN) by typping:
- echo "out" > /sys/class/gpio/gpio13/direction
Then make this GPIO pin active by typping:
- echo 1 > /sys/class/gpio/gpio13/value
To make it inactive just type:
- echo 0 > /sys/class/gpio/gpio13/value
Hope this helps