0

On Dr. Monk's library page here, he states: "You can attach up to 10 events to a timer." I am wondering if this is a hardware limit, or if it was an arbitrary number he chose for his library.

In Timer.h, he defines the maximum number of timed events like this:

#define MAX_NUMBER_OF_EVENTS (10)

Can you foresee any problems if I changed that to a higher number? My sketch is already approaching the limit of 10 timed events running at the same time, so it would help me if I was able to increase the maximum number of timed events to about 20.

1

I don't see anything that would cause any issue. Just don't exceed 255.

2
  • Thanks! I'll mark this as the answer if I don't notice any problems by tomorrow. I wonder why he would choose such a low arbitrary number. Even the forked updated versions on github keep the 10 limit. – Jerry Dec 18 '15 at 0:00
  • 1
    This is due to memory. The library creates 10 Event objects and stores them in an array. That is at least 11 bytes per object. – Gerben Dec 18 '15 at 13:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.