17Views1Replies

Author Options:

Button state is fluctuating? Answered

If I take out the LED and the buzzer, just leaving the button on the Lillypad pin 2, then watch the serial monitor, it shows 0 and 1 fairly randomly. I have adjusted all the alligator clips several times. Any ideas on what is happening?

Discussions

None
pillaleitner

1 year ago

pinMode(2,INPUT_PULLUP); in the setup section seems to make the pin stable.
Does this make sense?