25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

19 satır
275 B

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