-->
Page 3 of 6

Re: Attiny85 DHT22 Temp/Humidity logger

PostPosted: Thu Oct 16, 2014 9:19 pm
by longinus
wififofum wrote:So what does avg power consumption end up at? Around 10mW?


That seems about right... I haven't done a detailed analysis of how much power it uses while powered up. It seems to jump around quite a lot, so I wanted to put it under the scope to see if better.

Re: Attiny85 DHT22 Temp/Humidity logger

PostPosted: Thu Oct 16, 2014 9:20 pm
by longinus
nogueira wrote:Sorry, fixed.

You probably figured out it was the DEBUG option...
I've actually added an error message on compile if that's turned on for the attiny85. I would always leave it on too..

Did it compile in the end? There might also be issues with the softwareserial find function.
I started to change that yesterday... seems unnecessary to use it, I was just gonna write my own.

Re: Attiny85 DHT22 Temp/Humidity logger

PostPosted: Fri Oct 17, 2014 8:56 am
by nogueira
The find function is on the Stream.cpp and Stream.h

Tiny doesn´t have it. Now I´m using IDE 1.5.8 and it´s working

Re: Attiny85 DHT22 Temp/Humidity logger

PostPosted: Sun Oct 19, 2014 11:22 pm
by longinus
nogueira wrote:The find function is on the Stream.cpp and Stream.h. Tiny doesn´t have it. Now I´m using IDE 1.5.8 and it´s working

Aaa yeah, I think I've mentioned that at the github readme at some point...

BUT I just replaced that find function, it kinda made everything slower then it needed to.. So now it uses a function that actively waits for the response string, or timeouts if it doesn't find it. It constantly reads the serial buffer for the duration of the defined timeout. Seems to work well, and works with the Tiny core out of the box.

It made it way faster to send the data to the server, about 5 seconds from sleep.
Most of it is still the time it takes to connect to the AP, and that seems to change sometimes... I've seen it connect in 2 seconds, or up to 4; and it's hard to know for sure with the default firmware. So it unnecessarily always waits for 4 seconds to connect.

It will be way easier to use the AT firmware that igrr is developing.
I'm changing my code to use that now.