HC-SR04: tests on accuracy, precision and resolution of ultrasonic measurement

RiGonz:
Thanks a lot, Tim - I promise that I'll never ever write again that a sketch is "pretty simple"...
:slight_smile:
The typo in the sound speed expression is quite probably the cause of the large absolute errors that I "observed".
Regarding the room temperature, I checked it and was 23-24ºC - as you mention, not a big difference, but if I added the possibility I should have made use of it...
And I will look at the possible numerical errors related to using too many floats!
Hope to have it all done by this weekend!
:astonished:

I expect you will see very little difference. But, a few slight inaccuracies could add up to a slight measurable difference. Not dividing by 10,000 till the ping alone will fix the numerical errors (as shown in my previous post). Converting everything over to not using floats will make things just run faster and use less program space, it won't make much of a numerical error difference.

Anxious to see if there's a measurable difference...

Tim