Skip to content

Commit

Permalink
humidity: Add htu21d to controllers
Browse files Browse the repository at this point in the history
Relate-to: #13
Change-Id: I9872317ed9cae7c8a6966da962a71e2eb252ff95
Signed-off-by: Philippe Coval <rzr@users.sf.net>
  • Loading branch information
rzr committed Feb 7, 2020
1 parent 3b5453e commit 5e6ea66
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
var console = require('console');
var ColorSensor = require('color-sensor-js/example');
var GeolocationSensor = require('./geolocation');
var HumiditySensor = require('./humidity');
var AmbientLightSensor = require('./ambientlight');
var TemperatureSensor = require('./temperature');

Expand Down Expand Up @@ -50,6 +51,14 @@ module.exports.Geolocation = function(options) {
return (new GeolocationSensor(options));
}

module.exports.Humidity = function(options) {
if (!options) {
options = { controller: 'htu21d' };
}

return (new HumiditySensor(options));
}

module.exports.Temperature = function(options) {
if (!options) {
options = { controller: 'bmp085' };
Expand Down

0 comments on commit 5e6ea66

Please sign in to comment.