help!!

hi can someone tell me why this isnt working?

const byte ledPin = 13;
Button button = Button(12,PULLUP);

void setup(){
pinMode(ledPin,OUTPUT); //debug to led 13
}

void loop(){
if(button.uniquePress()){//button.isPressed() will cause the code to execute as long as button is pressed
//enter loop code here
digitalWrite(ledPin,HIGH);
delay(1000);
digitalWrite(ledPin,LOW);
delay(1000);
//end loop code

thanks

hi can someone tell me why this isnt working?

As posted, it won't even compile. So, it is pointless to talk about it working, or not.

You define an object named button which is from the Button class. Where is the compiler supposed to find how to build a Button object? (Hint: from the Button.h header file.) This implies that you copied the code from somewhere and that should tell you where to find the Button class library files.

Next, please read Nick Gammon's post at the top of this Forum on the proper way to use this Forum and how to post source code here. That makes it easier for us to answer your questions.

Thank you for the help i think i get it!!! I will look at the post thank you for the tip