#!/bin/sh
			 ## this is the path name to the BASH intrepretreter

LED_PIN=354  ## the sys file systen has the LED on pin 354

LED_GPIO=/sys/class/gpio/gpio${LED_PIN}    ## PathName to the LED GPIO fille

## Now we need to set the GPIO direction by writing 'out' to the file
## But first we check to see if it is already set

if test -d ${LED_GPIO}; then
    echo "PIN ${LED_PIN} already exported"
else
    echo ${LED_PIN} > /sys/class/gpio/export
fi

echo out > ${LED_GPIO}/direction

## Now we go into an endless loop
while true; do
    echo 0 > ${LED_GPIO}/value  ##  write a 0 to turn the LED off
    sleep 0.5
    echo 1 > ${LED_GPIO}/value  ##  write a 1 to turn the LED on
    sleep 0.5
done

