Skip to content

Instantly share code, notes, and snippets.

@johnroyer
Created April 16, 2017 14:30
Show Gist options
  • Select an option

  • Save johnroyer/5f1f1e439bdebcce476083c988ffbbdd to your computer and use it in GitHub Desktop.

Select an option

Save johnroyer/5f1f1e439bdebcce476083c988ffbbdd to your computer and use it in GitHub Desktop.
var webduino = require('webduino-js');
var board = new webduino.WebArduino('xxxx');
var dht;
board.on('ready', function() {
dht = new webduino.module.Dht(board, board.getDigitalPin(10));
dht.read(function(e) {
var temperature = dht.temperature;
var humidity = dht.humidity;
}, 1000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment