When you press a button, there is a chance that the button will not simply go from open to close. Since a button is a mechanical device, the contacts can bounce. (From Embedded Micro) For a short period after the button is pressed the value you read from an IO pin may toggle between 0 and 1 a few ti... By: alexwonglik