- Speed of sound
For the sake of simplicity, we will consider the speed of sound constant all over the travel from the transmitter to the receiver.
On many web sites one can find a formula that links the speed of sound and temperature.
t= temperature in celsius. For t=15°C; v=340 m/s or .034 cm/us
- Senso HC-SR04
How the sensor works is quiet obvious. A trigger pin must be set to one for at least 10us, then the processor generates the ultra-sound signal and set the echo pin high. That pin will stay high until the signal is received back.
What I expect:
Thus since the signal must travel forth and back the distance is actually d=(v*t)/2