Blinking LEDs with Intel Galileo, Yocto and shell script

Using shell script to control LEDs from the Yocto system powering the Intel Galileo board. Using the documentation from Sergey’s Blog. Full shell script bellow:

#!/bin/sh

# gpio17 = Galileo pin 5
# gpio24 = Galileo pin 6
# gpio27 = Galileo pin 7

for i in 17 24 27; do
  echo out > /sys/class/gpio/gpio$i/direction
  echo strong > /sys/class/gpio/gpio$i/drive
done

for i in `seq 5`; do
  echo 0 > /sys/class/gpio/gpio17/value
  echo 0 > /sys/class/gpio/gpio24/value
  echo 0 > /sys/class/gpio/gpio27/value
  sleep 1
  echo 1 > /sys/class/gpio/gpio17/value
  echo 1 > /sys/class/gpio/gpio24/value
  echo 1 > /sys/class/gpio/gpio27/value
  sleep 1
done