1
0
Fork 0

add buzzer script

This commit is contained in:
mmaster 2020-08-23 15:47:22 +02:00
parent c99ef5be8c
commit 84c896d48d
1 changed files with 20 additions and 0 deletions

20
buzzer.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
gpio=0
$(command -v gpio) mode IN $gpio
while true; do
buzzerstat="$($(command -v gpio) read $gpio)"
if [ "$buzzerstat" -eq 0 ]; then
/home/pi/RandomVideo/RandomVideo.sh buzzer
sleep 5
elif [ "$buzzerstat" -eq 1 ]; then
sleep 0.1
fi
done