Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Micro:bit and Ultrasonic Sensor Worksheet

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the main purpose of an ultrasonic sensor with Micro:bit?

a)

To measure temperature

b)

To measure distance

c)

To measure light

d)

To control voltage

2.

Which pins of the Micro:bit are usually used with the ultrasonic sensor?

a)

P0, P1, or P2

b)

GND and 3V only

c)

RX and TX

d)

SDA and SCL

3.

What is the role of the ‘if’ block in Micro:bit MakeCode?

a)

To repeat the code

b)

To check a condition and execute code if true

c)

To display images

d)

To set pin voltage

4.

What happens when the measured distance is less than the threshold in Micro:bit if-else program?

a)

LED turns on

b)

LED turns off

c)

Program stops

d)

Motor starts

5.

What does the ‘else’ block do in Micro:bit MakeCode?

a)

Executes code when the ‘if’ condition is false

b)

Stops the Micro:bit

c)

Turns off the LED permanently

d)

Measures distance again automatically

6.

Which Micro:bit block measures the distance from the ultrasonic sensor?

a)

Digital write pin

b)

Ultrasonic distance

c)

Show string

7.

Which statement correctly turns on an LED when an object is close?

a)

if distance < 10: show LED

b)

else distance > 10: show LED

c)

while distance > 10: turn off LED

d)

repeat forever: turn on LED

8.

Why do we use if-else statements with an ultrasonic sensor on Micro:bit?

a)

To control motor speed

b)

To decide when to turn the LED on or off based on distance

c)

To charge the battery

d)

To measure voltage

9.

Which Micro:bit pin type is used to connect the ultrasonic sensor?

a)

Analog pin

b)

Digital pin

c)

I2C pin

d)

RX/TX pin

10.

How does the Micro:bit calculate distance using ultrasonic sensor?

a)

Using sound waves and time of flight

b)

Using light reflection

c)

Using battery voltage

d)

Using temperature difference