diff options
Diffstat (limited to 'code/003-dht22.js')
-rw-r--r-- | code/003-dht22.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/code/003-dht22.js b/code/003-dht22.js new file mode 100644 index 0000000..c925120 --- /dev/null +++ b/code/003-dht22.js @@ -0,0 +1,5 @@ +var dht = require("DHT22").connect(C11); + +dht.read(function (data) { + console.log("Temp is "+data.temp.toString()+" and RH is "+data.rh.toString()); +});
\ No newline at end of file |