Button librarie doesnt work

hi ... i tried to use the example in libraries Buttons but only appear Fatal Error "WConstants.h" this is the error complete: Arduino:1.6.9 (Mac OS X), Card:"Arduino/Genuino Uno"

ATENCIÓN: .github Espúrias carpetas en librería 'Adafruit NeoPixel' /var/folders/zf/yvtgbts95y71ks0klt18l0w00000gn/T/arduino_modified_sketch_308511/sketch_jun20c.ino:1:25: fatal error: WConstants.h: No such file or directory

include "WConstants.h"

^ compilation terminated. exit status 1 Error compilación en tarjeta Arduino/Genuino Uno.

Any find a Solution?

Thank im new with this

WConstants.h is for much older versions of the IDE. You could try replacing "WConstants.h" with Arduino.h. If that won't work try to find a newer version of the library.

Hi Ramiro, and welcome to the Arduino forum!

I'm curious (as, I'm sure are many others here) about what you are doing with your button, and what you need it to do. I am of the opinion that a button library is almost never needed. Buttons are easy to deal with - they are open or closed. Debouncing - that is getting rid of the nervous change between one state and the other - can be dealt with in two ways: it can be waited out, or it can be ignored. I go about 50-50 on that.

Waiting bouncing out. A bounce is a physical scratchy connection. It makes, then it breaks, then it makes again. Many times, all within the few hundredths of a second it takes you to throw a switch. After a very short time, the switch is either open or closed. So just wait a tenth of a second or so before reading the state of a switch after an event. Use whatever timing method makes sense in your program. Even the following (simple and blocking as it is) works just fine:

...
    buttonState = digitalRead(button);
    delay(10);
    if (digitalRead(button) == buttonState) { _do the button pressed thing_ };
...

Other times it makes sense to just ignore the bouncing. If the effect is one that happens slowly (like a display or mechanical action), and the only button state is the last one, then just ignore bouncing. The button will end up in the right state in the end, so just read it and move on. You will be reading it again in a few millionths of a second anyway. this has the advantage that it is the fastest way to deal with a button.