diff --git a/README.md b/README.md index c026241..754f6b3 100644 --- a/README.md +++ b/README.md @@ -48,3 +48,9 @@ While the script is running, the LEDs on the LED array PCB should illuminate one ## Images ![RPi LED Array inside](https://raw.github.com/prizepony/rpi-ledarray-eagle/master/img/rpi_ledarray_inside.jpg) + +## Additional Scripts + +In the "code" folder exists a variety of scrips that make use of the Raspberry Pi LED array: + +showDiskUsage.sh - Displays the Raspberry Pi's disk usage diff --git a/code/testLEDarray.sh b/code/testLEDarray.sh index b0e2fd5..e8eeced 100755 --- a/code/testLEDarray.sh +++ b/code/testLEDarray.sh @@ -14,11 +14,17 @@ REV=2 PINS=(4 17 27 22 18 23 24 25 8 7) +# initialize all LEDs +for i in "${PINS[@]}" +do + echo "$i" > /sys/class/gpio/export + echo "in" > /sys/class/gpio/gpio$i/direction +done + # turn on all LEDs in order for i in "${PINS[@]}" do # toggle LED - echo "$i" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio$i/direction echo "0" > /sys/class/gpio/gpio$i/value echo -n "#"