johnnyb / Eventually

A library for event-based programming to make Arduino programming more fun and intuitive
MIT License
190 stars 41 forks source link

Main loop question #2

Closed rocketbob closed 7 years ago

rocketbob commented 7 years ago

Is it possible to use this library while retaining the main loop? I would like to integrate it into an existing project but I don't want to rewrite the code currently in loop().

newmedio commented 7 years ago

Assuming that your main loop runs relatively quickly, then you can just add the following line at the beginning or end of your loop and it will run perfectly:

mgr.loopIteration();

rocketbob commented 7 years ago

Yes it does run quickly. Thanks!