The ultrasonic sensor is a device that emits a very high frequency sound that we can’t hear and it measures the time it takes for the sound to bounce back (echo). From this we can determine how far away the object is.
This allows us to measure distance without the need for a physical ruler or measuring tape.
For rivers, this would be useful to measure distances across running water without disturbing the ecosystem. We could measure the distance to where invasive aquatic plants are growing over a river, or the distance of animals or fish from their spawning grounds, or even just how far across a riverbed is to see the level of erosion.
Practical:
Plug your Ultrasonic sensor into pin P0/P14, and the 4 Digit Display into P1/P15.
We will need to make a variable called display. Place the set display block into on start. Then in the circular value section, drag the 4-Digit Display at [P1] and [P15] into it (It will be [P0] and [P0] by default, you will need to change this).
Next in the forever loop. We will drag from grove the Strip show number ( ) block, and place the Ultrasonic Sensor (in cm) at [P0] into the right hand side value.
Lastly we will need to drag in the pause (ms) (100) block from Basic.