Button stops returning 'Pressed' or 'Released' #957
-
I don't think I'm using the Button class correctly but here goes. I have a physical latching pushbutton and I only want to know when it's been pushed, which would also be latched. As long as it's latched I want to do something. (Run through an array actually but that's not in the code here.) What happens with the snippet below (full code also farther below) is I click the latched pushbutton and it goes 6 or 8 or 9 times and then stops. It's not consistent. Thanks for any help or suggestions of ways to use other classes in Control-Surface for a simple latching pushbutton. AND thanks for providing this library!
Full sketch:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
I'm not sure I understand what you mean. Could you demonstrate with a shorter example? The Button class only returns one of |
Beta Was this translation helpful? Give feedback.
-
Possible issue: |
Beta Was this translation helpful? Give feedback.
This does not sound right. Could you post a minimal example?
Quickly scanning through your long code: where is the call to
clickerButton.begin()
?