Expansion Board
/*
* Project name:
LED BLINK
* Copyright
(c) Researchdesignlab.com
* Test configuration:
BOARD: RASPBERRY PI & BEAGLEBONE
Software: ECLIPSE
*/
#PROJECT NAME:INDIVIDUAL LED BLINK
#PROJECT LANGUAGE:SHELL SCRIPT
#COPYRIGHT:RESEARCH DESIGN LAB(C)
echo 4 > /sys/class/gpio/export
echo 17 > /sys/class/gpio/export
echo 22 > /sys/class/gpio/export
echo 25 > /sys/class/gpio/export
echo 24 > /sys/class/gpio/export
echo 23 > /sys/class/gpio/export
echo 18 > /sys/class/gpio/export
echo 27 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio4/direction
echo out > /sys/class/gpio/gpio17/direction
echo out > /sys/class/gpio/gpio22/direction
echo out > /sys/class/gpio/gpio25/direction
echo out > /sys/class/gpio/gpio24/direction
echo out > /sys/class/gpio/gpio23/direction
echo out > /sys/class/gpio/gpio18/direction
echo out > /sys/class/gpio/gpio27/direction
echo 0 > /sys/class/gpio/gpio4/value
echo 0 > /sys/class/gpio/gpio25/value
echo 0 > /sys/class/gpio/gpio24/value
echo 0 > /sys/class/gpio/gpio23/value
echo 0 > /sys/class/gpio/gpio22/value
echo 0 > /sys/class/gpio/gpio27/value
echo 0 > /sys/class/gpio/gpio18/value
echo 0 > /sys/class/gpio/gpio17/value
while [ 1 ]
do
echo 1 > /sys/class/gpio/gpio4/value
sleep 1
echo 1 > /sys/class/gpio/gpio25/value
echo 0 > /sys/class/gpio/gpio4/value
sleep 1
echo 1 > /sys/class/gpio/gpio24/value
echo 0 > /sys/class/gpio/gpio25/value
sleep 1
echo 1 > /sys/class/gpio/gpio23/value
echo 0 > /sys/class/gpio/gpio24/value
sleep 1
echo 1 > /sys/class/gpio/gpio22/value
echo 0 > /sys/class/gpio/gpio23/value
sleep 1
echo 1 > /sys/class/gpio/gpio27/value
echo 0 > /sys/class/gpio/gpio22/value
sleep 1
echo 1 > /sys/class/gpio/gpio18/value
echo 0 > /sys/class/gpio/gpio27/value
sleep 1
echo 1 > /sys/class/gpio/gpio17/value
echo 0 > /sys/class/gpio/gpio18/value
sleep 1
echo 0 > /sys/class/gpio/gpio17/value
sleep 1
done