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.

21 lines
346 B

  1. #!/bin/bash
  2. PIN_SALIGHT=11
  3. # init
  4. gpio mode $PIN_SALIGHT output
  5. # command
  6. if [[ "$1" == "on" ]]; then
  7. gpio write $PIN_SALIGHT 1
  8. elif [[ "$1" == "off" ]]; then
  9. gpio write $PIN_SALIGHT 0
  10. elif [[ "$1" == "read" ]]; then
  11. gpio read $PIN_SALIGHT
  12. elif [[ "$1" == "blink" ]]; then
  13. gpio blink $PIN_SALIGHT $2 $3
  14. else
  15. gpio toggle $PIN_SALIGHT
  16. fi