a guest Apr 21st, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- timeOfChange=`date +%s`
- while true
- sleep 1
- #state=$(gpio read 7)
- state=$(cat doorstate)
- if [ $state != $previousState ]; then
- now=`date +%s`
- if [ $state = $open ]; then
- echo "The door just opened after $duration seconds"
- echo "The door just closed after $duration seconds"
RAW Paste Data