when (moved / shaken / jumped) (micro:bit) — Scratch Block Guide
Detects physical gestures like shaking or jumping with the micro:bit.
What this block does
Detects physical gestures like shaking or jumping with the micro:bit.
Shake to roll a virtual die, clear a drawing canvas, or trigger a super move.
- Category: Extensions
- Key tip: Attach a battery pack so kids can move safely without tugging a USB cable.
Working Scratch example
Try building this small script in the Scratch editor, predict what will happen, then click the green flag to test it.
- When shaken
- Set dice to (pick random 1 to 6)
- Display dice
Try it: Shaking the micro:bit rolls a 1–6 die and shows the result on the LEDs.
Related block guides
Explore other blocks in the same category or return to the full English Block Dictionary.
FAQ
When should I use "when (moved / shaken / jumped) (micro:bit)" in Scratch?
Shake to roll a virtual die, clear a drawing canvas, or trigger a super move. Attach a battery pack so kids can move safely without tugging a USB cable.
This guide is provided for educational purposes. Scratch screens and terms may change over time, so please check the official Scratch website as well.