Example using distance values to form a visual output
Example using distance values to form a visual output

This will show three levels on the Micro:Bit LED display depending on how close the sensor is to an object.
Steve136/microbit-ultrasonic