khoih-prog/ESP8266TimerInterrupt

One shot operating mode

absalom-muc opened this issue · 2 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.