Skip to content

Instantly share code, notes, and snippets.

@adamrunner
Created August 6, 2017 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamrunner/f577015d126f0d09d6a09f1ac66108cd to your computer and use it in GitHub Desktop.
Save adamrunner/f577015d126f0d09d6a09f1ac66108cd to your computer and use it in GitHub Desktop.
tiny little bash script that runs on a cron job to pull the temperature from a SI7021 sensor on my C.H.I.P
#!/bin/bash
OUTPUT=`/usr/local/bin/si | grep -Po '(?<=Fahrenheit : ).+?(?=F)'`
CMD="mosquitto_pub -h temp.adamrunner.com -t outTopic -m ESP_E2106F,${OUTPUT}"
`$CMD`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment