RandomVideo/buzzer.sh
Vieno Hakkerinen 172c2330f1 add unlicense as license of project
* use unlicense to put work into public domain and not care for anything
* https://unlicense.org/
2020-08-24 16:47:55 +02:00

22 lines
322 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: Unlicense
# set gpio number
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