Most beginners have problems in understanding switch debouncing and state change detection, as well in doing several things at a time, and just in time. I've tried to simplify these tasks with little impact on code size and runtime, code name ALib0.
This library contains a button class and several task macros. See in detail the MultipleTasks example, for how easy it can be to implement concurrent asynchronous and synchronized activities.
Comments about possible bugs and missing documentation or examples are welcome