Kod: Markera allt
/opt/owfs/bin/owfs --fake=10 --allow_other /mnt/1wire
Kod: Markera allt
crontab -e
Kod: Markera allt
* /5 * * * /usr/bin/php /var/www/read_to_mysql.php
Kod: Markera allt
crontab: installing new crontab
"/tmp/crontab.Ep114b/crontab" :23: bad hour
errors in crontab file, can't install.
Kod: Markera allt
id sensor_serial temp_c date
128 10.4AEC29CDBAAB 41.6501 2012-04-01 16:45:01
129 10.67C6697351FF 16.9607 2012-04-01 16:45:01
130 10.F2FBE3467CC2 90.6804 2012-04-01 16:45:01
Kod: Markera allt
$latestvalue_q = "SELECT temp_c FROM temps ORDER BY id DESC LIMIT 1";
$latestvalue_r = @mysql_query($latestvalue_q);
$temperature = @mysql_fetch_assoc($latestvalue_r);