How about changing your existing callback:
dht.read(function (a) {Temp = a.temp.toString();Humidity = a.rh.toString();});
to:
dht.read(function (a) { Temp = a.temp.toString(); Humidity = a.rh.toString(); sendForm(Temp, Humidity); });
So now you send the form as soon as you have the information ready?
@Gordon 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.
How about changing your existing callback:
to:
So now you send the form as soon as you have the information ready?