blob: e7b4cd14729a9836b96ed540700622d50c684479 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
var dht = require("DHT22").connect(C11);
I2C1.setup({scl:B6,sda:B7});
var g = require("SH1106").connect(I2C1, start);
dht.read(function (data) {
console.log("Read DHT22");
g.drawString("Temp: "+data.temp.toString(),2,2);
g.drawString(" RH: "+data.rh.toString(),2,10);
g.flip();
});
|