I am beginning work on a project and needed some help to get me over one of these mental blocks im having (sort of like - damn, i should know this, but since i dont, i wont be able to think about anything else till i figure it out)
anyway, the question is -
i need my loop function to wait for the pressing of, 1 of 6 buttons, then, once of them is pressed, do something accordingly (this is easy enough)… but while doing it, disregard the buttons (that is, if a button is pressed while the “do something accordingly” action is occurring, the pressing of the button will be disregarded by the code).
the way i thought of doing this was something like
wait for button press → do something accordingly → while doing this action, set button output pin (or multiple pins, since i will have many buttons) to 5v (i would be using internal pull up resistors), making the buttons unusable (there wont be any change in value recorded by the arduino since either way a 5v input will be detected) → finished doing action → back to beginning of loop → set button pins back to gnd, making them usable once again…
would this work? anyone have a better way?