micro:bit Sensors Quiz

micro:bit Sensors Quiz

Test your knowledge of accelerometer gestures, compass, and temperature. — 6 questions

Question 1 of 6 Score: 0

About the micro:bit Sensors Quiz

Test your knowledge of accelerometer gestures, compass, and temperature. This quiz has 6 multiple-choice questions. Each question has one correct answer, and you see an explanation straight after you answer, so you learn from every question — including the ones you get wrong. There is no time limit and nothing to sign up for; your answers are not stored.

The questions follow the material in the Built-in Sensors on BBC micro:bit guide and the micro:bit Sensors Cheatsheet. Read them first if you want to prepare, or take the quiz cold to find the gaps in what you know.

Questions in this quiz

Preview the questions below. Each answer and its explanation are hidden until you choose to reveal them, so you can still take the quiz above without spoilers.

1. In what unit does accelerometer.get_x() return values?

  1. Degrees
  2. Metres per second
  3. Milli-g (1000 = 1g)
  4. Radians
Show answer

Answer: C. Milli-g (1000 = 1g)
The accelerometer returns values in milli-g. When the board is flat, get_z() reads approximately -1024 (one gravity downward).

2. Which gesture string is returned when the board is shaken?

  1. move
  2. vibrate
  3. shake
  4. jostle
Show answer

Answer: C. shake
The micro:bit firmware recognises "shake" as one of its built-in gestures, triggered by rapid movement in multiple directions.

3. What must you do before using compass.heading() for the first time?

  1. Import the compass library
  2. Call compass.calibrate()
  3. Reset the board
  4. Enable Bluetooth
Show answer

Answer: B. Call compass.calibrate()
compass.calibrate() runs an interactive mini-game that rotates all LEDs. Without calibration, compass.heading() returns unreliable data.

4. What does temperature() return on the micro:bit?

  1. Ambient room temperature in Kelvin
  2. CPU die temperature in Celsius (slightly above ambient)
  3. Temperature in Fahrenheit
  4. Humidity percentage
Show answer

Answer: B. CPU die temperature in Celsius (slightly above ambient)
temperature() reads the processor die temperature. It is typically a few degrees warmer than the actual room temperature.

5. Which SoundEvent constant detects when the microphone hears a loud noise?

  1. SoundEvent.LOUD
  2. SoundEvent.HIGH
  3. SoundEvent.BANG
  4. SoundEvent.NOISE
Show answer

Answer: A. SoundEvent.LOUD
SoundEvent.LOUD detects when the sound level crosses the loud threshold. SoundEvent.QUIET detects return to quiet.

6. What does accelerometer.was_gesture("shake") return after a shake has been detected once?

  1. True on every call until manually reset
  2. True only on the first call after the gesture, then False
  3. Always True
  4. Always False
Show answer

Answer: B. True only on the first call after the gesture, then False
was_gesture() acts as a latch: it returns True once for the detected gesture and then resets, similar to was_pressed() for buttons.

How to use this quiz

  • Answer every question before reading the explanations below — retrieving an answer from memory is what makes it stick.
  • Note the questions you missed and revisit the matching section of the guide or cheatsheet.
  • Retake the quiz a day or two later. Spaced repetition is one of the most reliable ways to remember technical details.

Related