Sonar Sensor (HC-SR04)
Using IO trigger for at least 10us high level signal
The Module automatically sends eight 40 kHz and detect whether there is a
pulse signal back.
IF the signal back, through high level , time of high output IO duration is
the time from sending ultrasonic to returning.
Test distance = (high level time×velocity of sound (340M/S) / 2