How: Combinations Of Push Buttons Call Different Functions

wvmarle:
It's not that trivial. It requires a few steps in your code.

  1. you're going to be checking all your buttons, then store the state in an array, and the moment they went LOW in a separate array (use millis()).
    2 ) you're going to check the buttons whether they are LOW and whether they are so for a minimum amount of time - to allow for bounce (10-20 ms is usually enough, especially if you reset the timer every time the button goes LOW). Any button that passed that time is considered a "pressed" button.
  2. you're going to see whether these buttons have been pressed long enough to react to (200 ms sound like a good time to me, this should be long enough for the second button to be added yet short enough to still feel "instantly" to the user), and if any is pressed long enough, check whether any other button is pressed at that same time to form a button combination.
  3. act on the button press or combo press as determined in step 3.

This is basically your loop(). Check buttons again and again and again, to see if any have been pressed.

Let me make sure I understand this. So I should first log the state of each button, then when they were pushed, then rank, then act.