March 2019
Intermediate to advanced
312 pages
7h 37m
English
Let's firstly look at the arithmetic equation for calculating distance, which is shown in the following diagram:

As indicated in the preceding diagram, let's imagine that the distance between the sensor and the object is 30 cm. The ultrasonic sensor travels at a speed of sound, which is 340 m/s, or 0.034 cm/μs.
To calculate the time taken, we will use the following equation:

If we move time to the left-hand side, and speed to the right-hand side, we get the following equation:
If we input ...