-->
Page 3 of 15

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sat Mar 21, 2015 3:37 pm
by chadouming
bakicc wrote:Thanks, compiling the dht22.lua worked. Be sure to have the firmware version where the node.compile method is implemented!

It's working now, great!

Why do we need to do the calculation "((temp-(temp % 10)) / 10).."."..(temp % 10)" to get the right temperature?
Why doesn't the method dht22.getTemperature() just return the right value?


Make sure you are using the firmware with float support and latest version of dht22.lua. Then you'll get correct reading using dht22.getTemperature()/10 . That is how I do it.

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sat Mar 21, 2015 3:43 pm
by rutierut
bakicc wrote:Thanks, compiling the dht22.lua worked. Be sure to have the firmware version where the node.compile method is implemented!

It's working now, great!

Why do we need to do the calculation "((temp-(temp % 10)) / 10).."."..(temp % 10)" to get the right temperature?
Why doesn't the method dht22.getTemperature() just return the right value?


To be honest i just copied this form a code from another forum user, MikeV. I looked at it and thought it was weird to but as it worked I forgot to look into it.

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sat Mar 21, 2015 4:51 pm
by rutierut
I will upload a code to control RGB leds tomorrow or maybe monday.

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sat Mar 21, 2015 5:25 pm
by bakicc
rutierut wrote:I will upload a code to control RGB leds tomorrow or maybe monday.


Cool! Looking forward to it :)

Which ESP chip version do you recommend?