problems with piezo buzzer and pushbutton

For a school project with Arduino I was thinking about making a piezo buzzer controlled by a pushbutton. When you push the button, the buzzer had to be on for 1 second, then silence until pushing again.
We're using a Arduino Leonardo. I made a code but it doesn't seem to work, nothing happens when you push the button. Can anyone help me? This is the code I made:

int groen = 3;
int BUZZER = 9;
int buttongroen = 0;
int buzzervalue = 0;
int hardheid;

void setup () {
pinMode (groen, INPUT);
pinMode (BUZZER, OUTPUT);
}

void loop () {
buttongroen = digitalRead(groen);
for (hardheid = 500; hardheid < 3000; hardheid ++){
if (buzzervalue == 0 && buttongroen == LOW) {
tone (BUZZER, hardheid, 500);
buzzervalue = 1; }
delay (1000);
buzzervalue = 0;
}
delay (1000); }

I would really appreciate some help. Maaike

There are two stickies at the top of the forum:
http://forum.arduino.cc/index.php?topic=149014.0
http://forum.arduino.cc/index.php?topic=97455.0

Read them, and try again.

How is your switch wired?