JSPM

tessel-temp-logger

1.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q34902F
  • License MIT

tessel beer temperature climate

Package Exports

  • tessel-temp-logger

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tessel-temp-logger) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tessel-temp-logger

Temp logger for using with beer brewing

Build Status Coverage Status Code Climate Dependency Status

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);