|Copyright||(c) Levent Erkok|
Demonstrates using two push-buttons to count up and down.
Two push-button switches, controlling a counter value. We will increment
the counter if the first one (
bUp) is pressed, and decrement the value if the
second one (
bDown) is pressed. We also have a led connected to pin 13 (either use
the internal or connect an external one), that we light up when the counter value
Wiring is very simple: Up-button connected to pin 4, Down-button connected to pin 2, and a led on pin 13.