From 86b1f0ef352205029457cc75e525f86aa70239e5 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Tue, 6 Feb 2024 13:57:43 +0100 Subject: fix env vars + sysfs + led demo --- rootfs/bin/helloled | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 rootfs/bin/helloled (limited to 'rootfs/bin/helloled') 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 -- cgit v1.2.3