webduino-bit-module-thermistor
v0.1.2
Published
Thermistor Module for Webduino Bit
Downloads
17
Readme
webduino-bit-module-thermistor
Module for Webduino:bit Thermistor.
Installation
bower
bower install https://github.com/webduinoio/webduino-bit-module-thermistor.git
Node.js
$ npm install webduino-bit-module-thermistor
Usage
let webduino = require('webduino-js');
require('webduino-bit-module-thermistor')(webduino);
const opts = {
board: 'Bit',
device: 'device_id',
transport: 'mqtt'
};
let board = new webduino.board[opts.board](opts);
board.once(webduino.BoardEvent.READY, (board) => {
board.samplingInterval = 250;
const thermistor = new webduino.module.Thermistor(board, 6);
thermistor.measure(function (val) {
console.log((Math.round(val * 100)) / 100);
});
});
License
This project is licensed under the MIT license, see LICENSE for more information.