Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

19 řádky
281 B

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