Something else, I’d like to double check.
I changed your sample code as such:
// seeedstudio.com/wiki/Ultra_S … ent_module says
// If no obstacle is detected, the output pin will give a 38ms high level signal.
duration = pulseIn(ping1Pin, HIGH, 38000);
I noticed that none of the PNG test code I’ve found puts a timeout on pulseIn. I have interrupt code that cannot afford to wait a full second
Can you confirm that my timeout is correct, or can I actually use a smaller timeout?