NEW Explore the Scratch Block Dictionary, tutorials, textbook, and classroom guides

Start learning →

when (moved / shaken / jumped) (micro:bit) — Scratch Block Guide

📌 What you will learn

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.

Example using when (moved / shaken / jumped) (micro:bit)
  1. When shaken
  2. Set dice to (pick random 1 to 6)
  3. 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.

Back to Extensions See the overview and patterns for Extensions. Learn more → Scratch Block Dictionary (All Categories) Browse Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and Extensions. Learn more →

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.