Linux Help for GPIO:


Linux kernel GPIOs related to the north part of the SOC numbered from 434:

GPIO_1 = 435

GPIO_2 = 436

GPIO_3 = 437

GPIO_4 = 438


You’ll Need to work as root (root password required):
$ su
Password:

To control gpio435 (GPIO_1, DS3 green LED on fitlet2):
$ echo 435 > /sys/class/gpio/export
$ echo out > /sys/class/gpio/gpio435/direction
$ echo 1 > /sys/class/gpio/gpio435/value
# DS3 green LED should be GREEN now
$ echo 0 > /sys/class/gpio/gpio435/value
# DS3 green LED should be OFF now
$ echo 435 > /sys/class/gpio/unexport

The GPIO framework and GPIO sysfs interface are documented in
https://www.kernel.org/doc/Documentation/gpio/gpio.txt