Ultrasonic distance sensor HC-SR04 lack of timeout problem

teckel:
That was the primary reason NewPing was written 3 years ago. It's evolved from there. This feature is listed as bullet item #3 in the introduction:
Doesn't lag for a full second if no ping echo is received like all other ultrasonic libraries.

Yeah, but i think you haven't got the point, that's not the problem I'm talking about (and solved with my lib)...

My SR04 sensor(s) doesn't simply "lag for a second" if no echo is received, it completeliy LOCKS UP, returning 0ms for all and every subsequent reads, until turned off and on, as suggested in other topics (using a pin to control a transistor to simulate physical disconnection of SR04 power cable). I still don't know if my SR04 (and the one used by many other users here) is a faulty series, or made by a "too-much-chinese" factory, by the way the problem was real and NewPing didn't solve it. After trying with 3 different SR04, I decided to buy SRF05 from now on, btw SF04 is a bit cheaper and I wanted to use them for low-purpose projects, and with my SRF05 library I have full control over it, without any hardware change!