It’s a good idea to add a “strain relief” with a zip tie or small wire to each end of the cable. One could secure the Ping)))’s cable to the header block and another may be used to keep the cable pointed upward so it doesn’t interfere with components on the breadboard. Make sure the cable doesn’t rub against anything when the servo moves.
The Ping))) Ultrasonic Distance Sensor lets your cyber:bot detect obstacles by measuring the distance to them.
Much like a bat, the Ping))) sensor emits an ultrasonic chirp, then listens for the chirp's echo. The time between these two events is used to calculate the distance to an object. While most objects will return an echo, be aware that size, material, and angle all make a difference, as shown in the image below.
The Ping))) sensor measures the echo return time in terms of microseconds. Then, it uses the fact that sound travels at 0.03448 cm/µs at room temperature. That’s 3.448 hundredths of a centimeter per millionth of a second at a temperature of (22.2 ºC). Just as a car travels distance = speed x time, so does sound, with an equation of s = ct, where s is the distance, c is the speed of sound and t is the time.
Did you know that the speed of sound in air actually changes with air temperature? This Learn reference article explains more about why this happens [1]. Temperature extremes can actually make a slight, but notable, difference in Ping))) sensor measurements.
Links
[1] https://learn.parallax.com/support/reference/speed-sound-air-vs-temperature