Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

21 rader
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