khoih-prog / ESP8266TimerInterrupt

This library enables you to use Interrupt from Hardware Timers on an ESP8266-based board. 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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

One shot operating mode

absalom-muc opened this issue · comments

I use your lib for periodic interrupts - works like a charm, thank you for that!

Addtionally I would like to use it in an one shot operating mode. So the interrupt should be triggered only once. It could be also solved by providing a duration as described here, but when my understanding is correct, the duration is not implemented so far.

Edit: Maybe there could be a way to detach an interrupt, e.g. by providing a reference by ITimer.attachInterruptInterval

Hi @absalom-muc

The new ESP8266TimerInterrupt releases v1.6.0 has just been published. Your contribution is noted in Contributions and Thanks

You can try ISR_16_Timers_Array_OneShot example to see how to use one-shot ISR-based timer

Best Regards,


Releases v1.6.0

  1. Add example ISR_16_Timers_Array_OneShot to demo how to use one-shot ISR-based timer
  2. Add example multiFileProject to demo for multiple-file project
  3. Optimize code by using passing by reference instead of by value

Thank you very much @khoih-prog! I appreciate your quick feedback.