webduino-bit-module-dht
v0.1.2
Published
DHT Module for Webduino
Downloads
10
Readme
webduino-bit-module-dht
Block Module for DHT11, of Webduino:bit.
Installation
bower
bower install https://github.com/webduinoio/webduino-bit-module-dht.git
Node.js
$ npm install webduino-bit-module-dht
Usage
require('webduino-blockly');
require('webduino-bit-module-dht');
const opts = {
board: 'Bit',
device: 'device_id',
transport: 'mqtt'
};
boardReady(opts, function (board) {
board.samplingInterval = 250;
const dht = getDht(board, bitGPIO(11));
dht.read(function(evt){
console.log(dht.temperature);
}, 1000);
});
License
This project is licensed under the MIT license, see LICENSE for more information.