Go Down

Topic: output dependant on 2 inputs. (Read 885 times) previous topic - next topic

robtillaart

@Rob
Quote
if (t_event1 - t_event2 < 2000)
    // both events happened within 2 seconds

If both are zero (just after init) this condition is also true ;) 
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Graynomad

Yeah I noticed your extra test for that gotcha.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up