Created
July 31, 2013 21:28
-
-
Save stwalkerster/6126356 to your computer and use it in GitHub Desktop.
https://github.com/stwalkerster/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_DHT_Driver/Adafruit_DHT.c compiled to "temphumid"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /root | |
DATA=`./temphumid 4` | |
old=$IFS | |
IFS=' | |
' | |
val="N" | |
for x in $DATA; do | |
val=$val":"$x | |
done | |
# echo $val | |
# rrdtool create environment.rrd --start `date +%s` --step 300 \ | |
# DS:temp:GAUGE:600:0:U \ | |
# DS:humid:GAUGE:600:0:U \ | |
# RRA:AVERAGE:0.5:1:288 \ | |
# RRA:AVERAGE:0.5:3:672 \ | |
# RRA:AVERAGE:0.5:12:744 \ | |
# RRA:AVERAGE:0.5:72:1480 | |
rrdtool update environment.rrd $val | |
IFS=$old | |
rrdtool graph /var/www/th.png -u 100 -l 0 -w 800 -h 300 -s `date -d -1day +%s` -e `date +%s` --title "Temperature and Humidity (last day)" "DEF:temp=environment.rrd:temp:AVERAGE" "DEF:tempyesterda$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment