Closed michapr closed 3 years ago
That would definitely save a lot of battery power 👍
The reading of the sensor is the longest time waiting as the i2c uses clockstretching which takes around 10ms where the mcu just waits
PR: https://github.com/atc1441/ATC_MiThermometer/pull/73
As I have seen the usage of the sensor will take much battery if wakeup if frequently. Because there are no needs to check the temperature every 6-7 seconds I have inserted a loop counter for sensor usage.
Advertising package (one unit 20ms, take the Voltage/10 = mA):
Sensor usage(one unit 20ms, take the Voltage/10 = mA):
adv_count will count the number of the loops in the main procedure until meas_count was reached.
So the delay could be set to a measurement once per minute as sample instead of every loop, it will save much battery.
second: Additional was fixed the overflow inside the advertising time condition for now with a counter inside ;)
This is great :)
Will merge it
Hi,
what do you think, does it make sense to extend the interval for reading temperature/humidity?
Loop delay time is 7 seconds as I have seen (tested) - readsensor() with wakeup / sleep sensor will be called in every loop.
Will it save battery if check the sensor values only once per minute as sample?