Light installation strobe interval advice with HC-S04 sensors: pics&code incl.

Thanks for your reply wvmarle! The flashing was pretty fast when the distance was <10cm.. I guess the interval would be 10ms?.. The lights definitely strobed pretty fast (they almost just look on)! So the realys seemed to handle it quite well. There's a video on them in action here if you're interested: Matthew Woodham on Instagram: "Field Maneuvers Interactive LED Prism Tower Installation 03. #arduino #proximity #sensor #interactive #light #installation #fieldmaneuvers"

I've just remembered that in my final code, I actually divided the distance calculation by 3 to make the interval smaller... so it was actually like this:

distanceA = ((durationA/2 / 29.1))/3;

Bit of a gross way to get a smaller, more strobe-rate intervals but just had to find something that worked at the time. Apologies I should've checked more the differences between versions! Let me know if you know a more elegant way to implement that.

That's super useful to know about the timeout - I didn't know that! That must be what's delaying it, thanks so much!

I'll test out 33333 as the timeout argument - is the pulseIn timeout value in µs then?

Thanks again.