Last updated Carlyn Maw Jan 2008
To help make basic button functions easier. Includes a debounce.
The first thing you need to do (after installing the library) is put the following line at the top of your code:
The next is create in instance of a button. Normally attach a button to a pin and start listening to it you have to set the pin mode in the setup loop. Here you define a button object with the other global variables before that. So to define a button on Pin 5 you'd need to pick a name (in this case "myButton") and include the following:
Button myButton = Button(5);
Now you are ready to have "myButton" do things in the main loop.