-->
Page 4 of 15

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sat Mar 21, 2015 8:07 pm
by bakicc
chadouming wrote:
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.


Thanks, going to try this!
Does this also works for the humidity?

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sat Mar 21, 2015 9:47 pm
by chadouming
bakicc wrote:
chadouming wrote:
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.


Thanks, going to try this!
Does this also works for the humidity?


yes

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sun Mar 22, 2015 4:47 am
by rutierut
bakicc wrote:
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?


Definitely the esp-12, it's easy to make it breadboard friendly , costs the same as an esp-01 and has all the io's broken out.

As for the other question regarding humidity, I'll finish that script too, I'll upload the finished version tomorrow.

Re: Fully working MQTT examples temperature, buttons etc.

PostPosted: Sun Mar 22, 2015 8:28 am
by rutierut
Added support for humidity & removed a useless part of example 1