so I started a project yesterday in which i am trying to get an event to happen when 2 buttons are pressed within a certain time of each other ie. button 1 is pushed and within 2 seconds button 2 is pushed and then an LED lights up.
I got a bit of help yesterday but am still struggling to get it to work any help pointing out where i am going wrong would be greatly appreciated.
Ive altered it and am still getting the same result, at present pushing "button 1" will light the led regardless of the other button for what ever period is set in "(abs(TS1-TS2) < 1000))"
I think that you want to record when the buttons first go HIGH, not that they are HIGH on this pass through loop(). This will require that you keep track of the previous state of the button. When the state changes to HIGH, record the time.