© Royalty Free/CORBIS
© Royalty Free/Corbis

And now for something completely different...
Buttons with a purpose!

Exercise 1
Exercise 2

Exercise 1—Bike Lite

Given the schematic:
bikelite.png
Create a safety bike light that turns on (blinks the lights on and off) when the button is clicked and turns off the next time the button is clicked.

If you notice some strange behavior when you press the button,

Exercise 2—Better Bike Lite

The bike lite should have a few modes.

If you used a boolean to test if the light was on or off, replace that variable with lightMode and set the type to int

When you press the button, the lightMode should increment, but if it has gone beyond the number of modes, reset the lightMode to 0.

In your loop test if the lightMode is not 0. To create different modes, change the interval values for each mode.

Source:http://www.ladyada.net