@MaBe I've just committed some code specifically for DHT22 - please could you give it a test?
// DHT22
var dht = require("https://raw.githubusercontent.com/espruino/EspruinoDocs/master/devices/DHT22.js").connect(pin);
// or use "https://raw.githubusercontent.com/espruino/EspruinoDocs/master/devices/DHT11.js" for DHT11
setInterval(function() {
dht.read(
function(a){
console.log("Temp is "+a.temp.toString()+
" and RH is "+a.rh.toString());
});}, 5000);
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.
@MaBe I've just committed some code specifically for DHT22 - please could you give it a test?