Skip to content

TimerManager question #13

@vidojev

Description

@vidojev

Hello Bruno,

First I have to thank you for the library, it is helping me a lot to learn C++ basic with Arduino. I have a question regarding management of multiple timers, as I am unable to understand how does it work.

Here is a scenario:

We have 5 timers, like in your multi-timer example and I want to handle them independently (like start/stop/pause) in two groups, like first 3 and last 2. I know how this can be managed individually one by one, but as you have provided TimerManager class I would like to have that “nice” solution. I have tried numbers of options, but, as I am lacking knowledge of a professional, was unable to achieve anything but constant compile errors (mostly “Compilation error: expected primary-expression before '*' token” after trying with i.e. “TimerManager::instance().add(Timer *timer5);”).

Or, maybe approach is to add/remove timers to one single group and then to start/stop/pause them? Whatever it is, I have no idea how to setup a code to manage that…

Can you help with an advice/example for this scenario?

Thank you in advance,
Vidoje.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions