buttons/actions question

have a look at the Arduino Tutorials and using buttons
Also a C tutorial would be useful.