tessel-temp-logger
v1.3.1
Published
tessel beer temperature climate
Downloads
13
Maintainers
Readme
tessel-temp-logger
Temp logger for using with beer brewing
Usage
var tessel = require('tessel');
var climateLib = require('climate-si7005');
var climate = climateLib.use(tessel.port.B);
var options = {
debug: true, // Whether or not to spit out all kinds of debug messages.
interval: 1 // Interval for sending data back (in seconds).
};
var ttl = require('tessel-temp-logger')(climate, options);
var numberOfChecks = 0;
// Function to call at every interval end.
function onTemperature(err, temperature) {
console.log('Temperature at %s is %d', new Date(), temperature);
numberOfChecks++;
if (numberOfChecks > 3) {
// This will stop the interval based checks.
ttl.stop();
}
}
// Start the temperature checking.
ttl.start(onTemperature);