This library enables you to use Interrupt from Hardware Timers on an Arduino, such as Nano, UNO, Mega, etc. It now supports 16 ISR-based timers, while consuming only 1 hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behaving functions or tasks. This important feature is absolutely necessary for mission-critical tasks.
MIT License
98
stars
11
forks
source link
Several intervals based on the same hardware timer - how to use? #4
It's not clear how the one can instantiate and use several timers based on a single hardware timer. I've checked the given examples and searched over the internet, but it's the same info available everywhere. All the examples seems to represent the same approach: init e.g. ITimer1, then attachInterruptInterval to it, in case the second timer is needed - ITimer2 goes through the same process, and that's all. As I understand, these two instances use different HW timers and so I have no idea how up to 16(!) timers can be attached/detached this way.
Hi!
It's not clear how the one can instantiate and use several timers based on a single hardware timer. I've checked the given examples and searched over the internet, but it's the same info available everywhere. All the examples seems to represent the same approach: init e.g. ITimer1, then attachInterruptInterval to it, in case the second timer is needed - ITimer2 goes through the same process, and that's all. As I understand, these two instances use different HW timers and so I have no idea how up to 16(!) timers can be attached/detached this way.
Please, help.
BR, Vyacheslav