I'm using a temperature / humidity sensor (DHT11) like this:
var dht = require ("DHT11"). connect (C11); dht.read (function (a) {console.log ("Temp is" + a.temp.toString () + "and RH is" + a.rh.toString ());});
However, I wanted a resolution of at least two decimal places. But I only get the whole number ... How should I proceed?
@cogo33 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.
I'm using a temperature / humidity sensor (DHT11) like this:
var dht = require ("DHT11"). connect (C11);
dht.read (function (a) {console.log ("Temp is" + a.temp.toString () + "and RH is" + a.rh.toString ());});
However, I wanted a resolution of at least two decimal places. But I only get the whole number ... How should I proceed?