Ultrasonic Transducer MB1000 LV-MaxSonar-EZ0

I would suggest not using something that averages out 60 pings like this sketch. Make a sketch just ping once, display the value, then wait around 50ms and ping again. With 60 pings, the numbers will be all over the place.

I also don't know why your sketch adds 5% to the cm distance. Sounds like the accuracy isn't correct, so someone tried to fix this in this way. I also wouldn't use floating point numbers. So, the cm calculation instead of:

cm = inches * 2.54*1.05;

would be:

cm = inches * 254 / 100;

This will reduce the compiled size by about 1000 bytes and remove the 5% adjustment.

Tim