Hello everyone. Even after reading a description of pulseIn, I still have a question. Let us have a code like that:
unsigned long pulseLength = 1000; // pulseTime = pulseIn (signalPin, HIGH, pulseLength); //
What happens, if after pulseIn() is called, it detects a pulse starting within 1000 us (1 ms), but the duration of the pulse (when the port goes LOW again) is beyond 1 ms from starting point? What will function return, 1000 or 0? My guess is 0, because description reads:
the length of the pulse (in microseconds) or 0 if no pulse is completed before the timeout
But I'd like to be sure.