You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
538 B

2 years ago
  1. #!/bin/bash
  2. LED3_PATH=/sys/class/leds/beaglebone:green:usr3
  3. function removeTrigger
  4. {
  5. echo "none" >> "$LED3_PATH/trigger"
  6. }
  7. echo "The LED3 user is starting"
  8. if [ "$1" == "on" ]; then
  9. removeTrigger
  10. echo "1" >> "$LED3_PATH/brightness"
  11. elif [ "$1" == "off" ]; then
  12. removeTrigger
  13. echo "0" >> "$LED3_PATH/brightness"
  14. elif [ "$1" == "blink" ]; then
  15. removeTrigger
  16. echo "1" >> "$LED3_PATH/brightness"
  17. sleep 0.5
  18. echo "0" >> "$LED3_PATH/brightness"
  19. sleep 0.5
  20. fi
  21. echo "Done"