Last question i read data from this sensor AM2301 and see ( Temp is -1 and RH is -1 )
All connected to GPIO D1.
Code from examples: dht.read(function (a) {console.log("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString());});
My example programm:
var wifi = require("Wifi"); var dht = require("DHT22").connect(D1);
wifi.connect("xxx", {password:"xxx"}, function(err){ console.log("connected? err=", err, "info=", wifi.getIP()); }); wifi.stopAP();
wifi.save();
function readTemp(){ dht.read(function (a) {console.log("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString());}); }
Thanks all .. this is my problem... i connect in my board D1 and Read from programm. D1.. But realy all pinout is other..
Example: ESPRUINO => D0 is my board => D3 -- GPIO0
2 Attachments
@Aleksandrs started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Last question i read data from this sensor AM2301
and see ( Temp is -1 and RH is -1 )
All connected to GPIO D1.
Code from examples: dht.read(function (a) {console.log("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString());});
My example programm:
var wifi = require("Wifi");
var dht = require("DHT22").connect(D1);
wifi.connect("xxx", {password:"xxx"}, function(err){
console.log("connected? err=", err, "info=", wifi.getIP());
});
wifi.stopAP();
wifi.save();
function readTemp(){
dht.read(function (a) {console.log("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString());});
}
Thanks all .. this is my problem... i connect in my board D1 and Read from programm. D1.. But realy all pinout is other..
2 Attachments