micro:bit Sensors Quiz
micro:bit Sensors Quiz
Test your knowledge of accelerometer gestures, compass, and temperature. — 6 questions
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?
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?
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?
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?
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?
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?
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.