選択できるのは25トピックまでです。
トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
|
- #!/bin/bash
-
- PIN_ELIGHT=7
-
- # init
- gpio mode $PIN_ELIGHT output
-
- # command
- if [[ "$1" == "on" ]]; then
- gpio write $PIN_ELIGHT 1
- elif [[ "$1" == "off" ]]; then
- gpio write $PIN_ELIGHT 0
- elif [[ "$1" == "read" ]]; then
- gpio read $PIN_ELIGHT
- else
- gpio toggle $PIN_ELIGHT
- fi
-
|