Linux Help for GPIO:



In Linux kernel there are 4 related GPIOs: GPIO435, GPIO436, GPIO437, GPIO438.

  • GPIO435 - LED1 GREEN
  • GPIO436 - LED1 YELLOW
  • GPIO437 - LED2 GREEN
  • GPIO438 - LED2 YELLOW


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

$ su

Password:


Example:


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