Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

Possible problem with debounce example

$
0
0

I'm working with the debounce example at http://energia.nu/Tutorial_Button.html

 

According to the description, the program lets you blink a LED using a pushbutton.

 

The way I read that (and the code!), the button is supposed to toggle the state of the LED: turn it on if it was off, and turn it off if it was on.

 

However, that's not what happens when I run it on my Launchpad.  What happens instead is that it starts out with the LED lit.  The LED will stay on and will only be off while the pushbutton is held down.

 

I'm using the internal LED and pushbutton.

 

Did I misunderstand how the example is supposed to work?  (Very possible, but that would make the debouncing completely pointless :-). 


Viewing all articles
Browse latest Browse all 2077

Trending Articles