slight_ButtonInput arduino library for extended / event-based button handling to get started try the minimal sketch. if you need more functionality have a look at the other examples: basic some more options.. advanced shows how to use lots of buttons in an array fashion advanced2 example how to use in a object-oriented multi-class setup. this only works on SAMD boards.