User Manual
19 20
Project 8 : Ultrasonic Meter
Diculty Level
Part List
Description
8. Ultrasonic Meter
In this demo, you will learn how to use the
ultrasonic sensor to measure distance and
show the value on a display.
Note: This project requires high input
voltage, please use the Grove Shield for
micro:bit to power the circuit.
1x Grove - Ultrasonic Ranger
1x Grove - 4-Digit Display
1x Grove Shield for micro:bit
1x micro:bit
1
2
3
4
Steps
2. Add basic block on start, then add variable blocks
set item to 0, rename ‘items’ to ‘Display’. If you have
successfully added the Grove package, replace
“0”with Grove block 4-Digit Display at P1 and P15.
2. Add basic block forever, then add Grove block item
show number 0, rename ‘item’ to ‘Display’, replace ‘0’
with Grove block Ultrasonic Sensor (in cm) at P0.
5. Use your hand to move up and down on the
ultrasonic ranger and read the value on the 4-Digit
display.
Try to use this creation to measure distance in your room.
3. Add basic block pause (ms) (100),
4. ClickDownload to transfer your code in micro:bit!
1
1
2
2
3
3
3
1
4
8888
:
2
P0/P14
P1/P15