Turn on and off GPIO pin on Raspberry with gmail

TringaliLuca Apr 21st, 2017 (edited) 30 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. pin=7
  3. command=$(curl -u username:password --silent "" |  grep -Po '(?<=(<summary>)).*' | sed 's/<\/summary>.*//'
  5. if [ -n "$command" ]; then
  6.     gpio write $pin $command
  7. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand