Couldn't get EmonTH code to return valid temperatures
Submitted by boardgamer on Fri, 06/02/2015 - 18:28
I installed an emonTH node a couple of weeks back (temperature only, no humidity sensor), and only just noticed that the temperature being returned is permanently 85.1. Yes, that's after being divided by 10! That's wrong on so many levels!! I installed another emonTH at the same time (with humidity sensor), with the same code and that has been working fine.
I was using the emonTH_DHT22_DS18B20 sketch as being the most basic available for the emonTH. I finally tracked the problem down to the line
sensors.setWaitForConversion(false);
When I commented this line out, the correct temperature was returned and all is now well. I understand this line is there to reduce power consumption, but I'm not sure whether removing it will have a serious impact, nor whether something else should be fixed to enable the line to work as intended. (Or indeed whether the line should even be there in the first place!) Any guidance welcome.
Couldn't get EmonTH code to return valid temperatures
Submitted by boardgamer on Fri, 06/02/2015 - 18:28I installed an emonTH node a couple of weeks back (temperature only, no humidity sensor), and only just noticed that the temperature being returned is permanently 85.1. Yes, that's after being divided by 10! That's wrong on so many levels!! I installed another emonTH at the same time (with humidity sensor), with the same code and that has been working fine.
I was using the emonTH_DHT22_DS18B20 sketch as being the most basic available for the emonTH. I finally tracked the problem down to the line
sensors.setWaitForConversion(false);
When I commented this line out, the correct temperature was returned and all is now well. I understand this line is there to reduce power consumption, but I'm not sure whether removing it will have a serious impact, nor whether something else should be fixed to enable the line to work as intended. (Or indeed whether the line should even be there in the first place!) Any guidance welcome.
Robert.