From 6cb056f979f20e895930940c94b05767d081dd61 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Thu, 23 Feb 2017 22:11:21 +0100 Subject: Some additional slides --- code/003-dht22.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 code/003-dht22.js (limited to 'code/003-dht22.js') 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 -- cgit v1.2.3