From 612a0afa63144aae338a51c9206a589d4b8fdd65 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 7 Feb 2024 14:06:30 +0100 Subject: WIP web server --- rootfs/bin/helloled | 4 +--- rootfs/bin/leds | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100755 rootfs/bin/leds (limited to 'rootfs/bin') diff --git a/rootfs/bin/helloled b/rootfs/bin/helloled index 877faab..1426a7c 100755 --- a/rootfs/bin/helloled +++ b/rootfs/bin/helloled @@ -2,8 +2,6 @@ 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 + leds $BRIGHTNESS sleep 0.5 done diff --git a/rootfs/bin/leds b/rootfs/bin/leds new file mode 100755 index 0000000..5fb425e --- /dev/null +++ b/rootfs/bin/leds @@ -0,0 +1,5 @@ +#!/bin/sh +for i in $(seq 0 3) ; do + echo "$1" > "/sys/class/leds/beaglebone:green:usr$i/brightness" +done + -- cgit v1.2.3