Add toolkit scripts

This commit is contained in:
Dejvino
2020-12-14 14:22:01 +01:00
parent c93c5acc41
commit cf079a8c21
4 changed files with 60 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/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