From 5e60aa8de70487f712a54daecff55a5da198ff5d Mon Sep 17 00:00:00 2001 From: Gerardo Marx Date: Wed, 1 Feb 2023 01:30:42 +0000 Subject: [PATCH] Repository with basic instructions --- Readme.md | 0 leds.sh | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Readme.md create mode 100755 leds.sh 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