Bounce is a library for Arduino (arduino.cc). It debounces digital inputs and more.
The 2 indicates this is the second version of the Bounce library. It also indicates it is not 100% compatible with the previous version. The library has been upgraded with better algorithms and modifications suggested by various users.
Please look at the examples included with the library for more information. But the biggest change is the following :
Bounce bouncer = Bounce(inputPin, 5);
Bounce bouncer = Bounce();
*not required with the previous version
// Setup the button pinMode( inputPin ,INPUT); // Activate internal pull-up (optional) digitalWrite( inputPin ,HIGH);
// After setting up the button, setup the object bouncer .attach( inputPin ); bouncer .interval(5);