Need Help with Piezo Buzzer and Ultrasonic Sensor code

Haha, hysteresis set to zero is pretty funny, it goes off very often, rapidly at times. Now the hysteresis value is in CM correct? I guess it would have to be, since the rest is in CM, and it's just basic math.

If I wanted to mount this sensor to a servo and use it for obstacle detection for a robot, then in your opinion what type of sensitivity would I need so the robot has time to properly maneuver?
I guess that would depend on how fast or slow it is, but mine won't move that fast as it is just powered by dual Tamiya motors (#70168).

I have the chassis built and it will probably end up around 20x15x15 CM in area/dimension when it's all put together. I've been planning it and acquiring parts the last couple months but decided it would be best to learn how each component works by itself before I try to put it all together into one machine. That and learning a new programming language.