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