Are you sure you've got it wired up right? I suppose you might expect this if the 3.3v line wasn't connected properly?
I guess you could try copy/pasting the code from the module and fiddling with the value used for setTimeout? I'm struggling to see how there could be much other difference
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.
You know about it returning -1 if there are problems reading the data? That will happen occasionally so you need to be sure to ignore them.
Running two reads at the same time is a really bad idea as multiple watches/timeouts get queued up - see the actual code: https://github.com/espruino/EspruinoDocs/blob/master/devices/DHT22.js
Are you sure you've got it wired up right? I suppose you might expect this if the 3.3v line wasn't connected properly?
I guess you could try copy/pasting the code from the module and fiddling with the value used for
setTimeout
? I'm struggling to see how there could be much other difference