commit 5e60aa8de70487f712a54daecff55a5da198ff5d Author: Gerardo Marx Date: Wed Feb 1 01:30:42 2023 +0000 Repository with basic instructions diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..e69de29 diff --git a/leds.sh b/leds.sh new file mode 100755 index 0000000..5ccdd89 --- /dev/null +++ b/leds.sh @@ -0,0 +1,24 @@ +#! /bin/bash + +LED=/sys/class/leds/beaglebone:green:usr +num=$1 + +function removeTrigger +{ + echo "none" >> "$LED$num/trigger" +} + +echo "Running the LED script." + +if [ $# != 1 ]; then + echo "Error, wrong number of arguments" + echo "Try ./leds.sh 1" + exit 2 +fi + +if [ $# == 1 ]; then + #echo "none" > "$LED$1/trigger" + removeTrigger + echo "1" > "$LED$1/brightness" + exit 0 +fi