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
//end loop code


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