Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiriksm/tessel-temp-logger
Temp logger for using with beer brewing
https://github.com/eiriksm/tessel-temp-logger
Last synced: about 2 months ago
JSON representation
Temp logger for using with beer brewing
- Host: GitHub
- URL: https://github.com/eiriksm/tessel-temp-logger
- Owner: eiriksm
- Created: 2015-01-28T16:46:02.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T20:55:29.000Z (over 7 years ago)
- Last Synced: 2024-10-12T01:46:11.970Z (3 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tessel-temp-logger
Temp logger for using with beer brewing[![Build Status](https://travis-ci.org/eiriksm/tessel-temp-logger.svg?branch=master)](https://travis-ci.org/eiriksm/tessel-temp-logger)
[![Coverage Status](http://img.shields.io/coveralls/eiriksm/tessel-temp-logger.svg)](https://coveralls.io/r/eiriksm/tessel-temp-logger?branch=master)
[![Code Climate](http://img.shields.io/codeclimate/github/eiriksm/tessel-temp-logger.svg)](https://codeclimate.com/github/eiriksm/tessel-temp-logger)
[![Dependency Status](https://david-dm.org/eiriksm/tessel-temp-logger.svg?theme=shields.io)](https://david-dm.org/eiriksm/tessel-temp-logger)## Usage
```js
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);
```