• Hi! It's basically impossible for you to press both buttons at exactly the same time, so instead you just need to shift thinking a bit - call the same function when either button is pressed, then check the state of both in that function:

    function check() {
      var a = BTN1.read();
      var b = BTN2.read();
      if (a&&b) console.log("Both pressed!");
    }
    setWatch(check, BTN1, {repeat:true, edge:"rising", debounce:20});
    setWatch(check, BTN2, {repeat:true, edge:"rising", debounce:20});
    
About

Avatar for Gordon @Gordon started