Why can I measure two pins simultaneously? I would like to do an action if both buttons on my arduino pro micro are depressed simultaneously. I'm getting some strange results:

// Buttons
Bounce button0 = Bounce();
Bounce button1 = Bounce();

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ;
  }

  pinMode(2, INPUT_PULLUP);
  button0.attach(2);
  button1.interval(1);

  pinMode(3, INPUT_PULLUP);
  button1.attach(3);
  button1.interval(1);

  Serial.println("Setup Complete");
}

void loop() {
  button0.update();
  button1.update();

  if (button0.fell()){
     Serial.println("button0 fell");
  } else if (button0.rose()) {
    Serial.println("button0 rose");
  }

  if (button1.fell()){
     Serial.println("button1 fell");
  } else if (button1.rose()) {
    Serial.println("button1 rose");
  }

  if (button0.fell() &amp; button1.fell()){
    Serial.println("buttons fell");
  } else if (button0.rose() &amp;&amp; button1.rose()) {
    Serial.println("buttons rose");
  }
}


Here is the output to the Serial console:

Setup Complete
button0 fell
button1 fell
button0 rose
button1 rose


Why isn't this branch being executed? button0.fell() &amp; button1.fell() For the life of me I cannot figure this out. Thank you!

EDIT

This doesn't work either, which is crazy:

void loop() {
  button0.update();
  button1.update();

  if (button0.fell()) {
    if (button1.fell()) {
      Serial.println("buttons fell");
    }
  }

  if (button0.rose()) {
    if (button1.rose()) {
      Serial.println("buttons rose");
    }
  }
}


EDIT

Thank you for the answers! Unless the person was to push both buttons in the exact same iteration of the loop, my code would never work. Here is what I ended up using:

if ((button0.fell() &amp;&amp; !button1.read()) || (button1.fell() &amp;&amp; !button0.read())) {
You can test it easily by calling the function twice directly after each other. If the first time a true is returned and the second time a false, the state is internally reset.

But probably because after you call the fell function, the internal state is reset, so after the call not a new fell has been happened.

So store the return value of the fell and rose functions and use those instead.

Update:

I'm not sure if this is the actual implementation but I found for fell/rose and see this:

bool Bounce::rose()  
{  
    return ( state &amp; _BV(DEBOUNCED_STATE) ) &amp;&amp; ( state &amp; _BV(STATE_CHANGED));  
}  

bool Bounce::fell()  
{  
    return !( state &amp; _BV(DEBOUNCED_STATE) ) &amp;&amp; ( state &amp; _BV(STATE_CHANGED));  
}  


So as long as the state has not changed it returns false (which is similar/equal as 'resetting the internal state'. Except this reset is done at a different location (but checked in the fell and rose function).

Update:

See remarks from gre_gor below