diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-02-06 13:57:43 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-02-06 13:57:43 +0100 |
commit | 86b1f0ef352205029457cc75e525f86aa70239e5 (patch) | |
tree | e356eb20edc24c4ab10eede5270e348f9e00e4cd /rootfs/bin/helloled | |
parent | a9ef380662da3efa382017ff8423f1a894b31bfd (diff) |
fix env vars + sysfs + led demoweek4
Diffstat (limited to 'rootfs/bin/helloled')
-rwxr-xr-x | rootfs/bin/helloled | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rootfs/bin/helloled b/rootfs/bin/helloled new file mode 100755 index 0000000..877faab --- /dev/null +++ b/rootfs/bin/helloled @@ -0,0 +1,9 @@ +#!/bin/sh +BRIGHTNESS=0 +while true ; do + BRIGHTNESS=$(( ( $BRIGHTNESS + 1 ) % 2 )) + for i in $(seq 0 3) ; do + echo $BRIGHTNESS > "/sys/class/leds/beaglebone:green:usr$i/brightness" + done + sleep 0.5 +done |