SWAT-engineering / kiwi-air-monitor

Kiwi monitor is an open source CO2/Humidity/Temperature sensor intended for monitoring the quality of the air in a room. Kiwi was created to support teachers with a notification to ventilate their classroom.
https://www.kiwimonitor.nl/
GNU General Public License v3.0
10 stars 2 forks source link

Switch to timer based on cyclecount #24

Closed DavyLandman closed 4 years ago

DavyLandman commented 4 years ago

Look at PolledTimeout.h for inspiration.

It's only suited for timers that tick at max every 25s, but for a lot of our cases that is fine.

DavyLandman commented 4 years ago

Skipping for now, millis() is fast enough, and the cycle count overflows at 32bit, while the timer library wants a value that overflows at 64bit, so that would end up partially repeating the logic of millis.