BlinkyBoard Button Reliability
edited December 2013 in BlinkyTape Troubleshooting
It seems difficult to reliably get the BlinkyBoard button to register. It takes me 4 or 5 tries sometimes. Anyone else have this problem? Is it a specific pressure that's required, or does the button need to be depressed for a set amount of time, or am I supposed to use a finger nail or my whole thumb, or is it something else?
Trying to find out myself just led me to first experience with the reset pin..
Edit: Looking at the board schematics, apparently the answer is "no".
Atmega32u4 should have an interrupt on the pin you're calling IO_A, but not on the button pin.
So short of shorting (excuse the pun) the two pins together it looks grim.
it's unfortunately not one of the ones that Arduino supports natively (i tried, but it wasn't possible to route one of those lines over to the button).
There's a library that might work for it, too:
I was specifically looking to make something dead simple that doesn't rely on libraries.
This sketch deliberately waits half a second between checking button state / updating the display, but an interrupt is used to track the current button state and total push count, therefore being in a delay() or doing other work doesn't hinder it.
Note that the button press detection is STILL not 100% reliable (as the button indeed is a bit fickle in when it switches state), but is much more reliable than checking for pin state in a loop.
I modified the the christmas lights example into my own program that polls the button much more frequently. The button lag is nearly gone now. I just have to consciously hold the button down and it registers soon enough to be usable.
Yes - the button polling in that example is not the best, and I think we're going to be updating some of our examples with a register-based polling scheme that should make the button more usable.