Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • There is no need for a new as timer is not a pointer but an instance of Timer: it is in the static data section, not the heap. Its constructor is called (otherwise my ISR would never get called) Commented Mar 20, 2014 at 0:08
  • That will bloat the code with the malloc library and consume a bit of the precious RAM for no good reason. The only thing needed here is to get the init code called after the static object constructors. You don't need another instance to do that, just move the object creation inside setup() or put the init code in a separate method that you will call inside setup(). Commented Aug 2, 2017 at 3:32