You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
163 B

2 years ago
#!/bin/bash
2 years ago
echo $1
2 years ago
gpio mode $1 out
2 years ago
let "out=`gpio read $1`"
2 years ago
echo $out
2 years ago
if [ $out = 1 ]
2 years ago
then
gpio write $1 0
echo 0
2 years ago
else
gpio write $1 1
echo 1
2 years ago
fi