Kalyax
2 years ago
4 changed files with 5 additions and 5 deletions
@ -1,12 +1,12 @@ |
|||
#!/bin/bash |
|||
|
|||
gpio mode $1 out |
|||
|
|||
if [ gpio read $1 = 1 ] |
|||
let "out=`gpio read $1`" |
|||
if [ $out = 1 ] |
|||
then |
|||
gpio write $1 0 |
|||
echo 0 |
|||
else |
|||
gpio write $1 1 |
|||
echo 1 |
|||
fi |
|||
fi |
|||
|
Loading…
Reference in new issue