http://playground.arduino.cc//Code/TButton -- This library allows a momentary switch to function as an on/off toggle switch by checking for button press and changing the button state (and handles button bounce). This library also adds a method for delays that also checks for button presses during the delay. To install, find the directory used by Sketch > Import Library and unzip the file into that directory. The library will then show up in Sketch > Import Library. See TButton.h for the library interface details.
Share this library with your friends on your favorite profile: