Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
Mention the disk usage script in the README. Minor change to the test…
Browse files Browse the repository at this point in the history
… script to turn off all LEDs on start.
  • Loading branch information
prizepony committed Aug 27, 2013
1 parent bd4d635 commit af8dc84
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -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
8 changes: 7 additions & 1 deletion code/testLEDarray.sh
Expand Up @@ -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 "#"
Expand Down

0 comments on commit af8dc84

Please sign in to comment.