Arduino/Linux Interface to 1-Wire Digital Thermometers

Temperature data is adjusted, cast as javascript arrays, imbedded within html, and rendered with the flot jquery extension.  
The recent.cgi script selects and formats tail rows of history.txt files found in the results directory. Our calibration process is applied here.

Cron envokes sample.pl periodically to retrieve and record data from the upstream service. This provides a reliable timebase. A voting process selects the best data in the interval. Each sample includes winning and total vote counts.

The linux server, home.c2.com, provides a gateway to home resources. Apache proxies some requests to k9ox, a linux server that serves primarily as an IRLP node.
The one-wire.cgi script selects 1000 tail rows of Arduino data logged in a flat file, data.txt.

A long-lived process uses cat to copy data from the Arduino's USB serial port. The -u option suppresses output buffering so lines appear one at a time.

The TempTest Arduino program's loop method scans for and reads any number of DS18B20 digial thermometers using the 1-wire discovery, data transfer and parasitic power protocol.

A second Arduino analogReads a CdS photocell when polled via the ethernet shield and WebServer software. A simplified cron script, sample-light.pl, polls this server and logs results in the history db.


(cc) 2008, Ward Cunningham
Creative Commons, Attribution, Share-Alike
Commits | Index