Micro:Bit Robotics Workshop: Coding Basics Before You Build
By Thames & Kosmos Online Store | Published: 2026-09-11
Category: Handleidingen
Learn micro:bit coding basics before buying motors or chassis. A step-by-step workshop plan using block coding, with one common mistake to avoid at each stage.
Quick answer
Teach the micro:bit's built-in inputs and outputs with block coding before you attach motors, wheels, or a chassis. Run a short workshop where each learner writes, downloads, and tests one program per sensor, then combine two inputs into a single reaction. That sequence builds the debugging habits a robot needs, so the build stage becomes assembly rather than troubleshooting.
Most robotics workshops fail at the same point: the robot is assembled, the battery pack is connected, and nothing moves because nobody has practiced reading a program. The micro:bit is a good fix for this because its buttons, LED grid, and sensors work without any add-on hardware. You can teach micro bit coding basics on the board alone, then add motors once the logic is familiar.
This workshop plan runs in order, from a single output to two inputs working together. Each step includes the mistake that stalls beginners most often, so you can watch for it instead of discovering it after the build.
What to prepare before the first session
You need one micro:bit per learner or pair, a computer or tablet with the block editor open, and a USB cable for each board. Decide in advance whether learners will download files by cable or pair over Bluetooth, because switching methods mid-session costs more time than it saves. Print or display the block categories so beginners can find Input, Basic, and Logic without hunting.
Keep the first session hardware-free beyond the board itself. Motors, wheels, and battery packs introduce power and wiring variables that hide coding mistakes. A board that only blinks is easier to debug than a chassis that might also have a loose lead.
- Label each micro:bit with a name or number so downloaded files do not get mixed up.
- Test every USB cable beforehand; charge-only cables will not transfer a program.
Step 1: Make one output happen on purpose
Start with the LED grid. Ask learners to display a single icon when the program starts, then change it to a different icon. The goal is not creativity yet; it is confirming that the edit, download, and run cycle works end to end. Once a learner sees their own icon appear, the tool stops feeling abstract.
The common mistake here is skipping the download step and assuming the board updated itself. Have each learner point at the board and say what they expect to see before it runs. If the board shows the old icon, the file did not transfer.
- Checkpoint: every learner can change an icon and see the change on their own board.
Step 2: Add a button as an input
Now connect an event to an action. A button press should trigger a specific icon, and a second button should trigger a different one. This is where micro bit block coding earns its place: the blocks show the cause-and-effect structure visually, so learners see that an event wraps the action rather than sitting beside it.
The mistake to watch for is putting the display block outside the button event, which makes the icon appear immediately instead of on press. Ask learners to describe when the icon should appear, then check whether their blocks match that sentence.
- Checkpoint: pressing each button produces a different, predictable result.
Step 3: Store a value and change it
Introduce a variable as a counter. Each button press adds one, and the number shows on the grid. This is the conceptual leap in micro bit for beginners: the board now remembers something between presses. Keep the variable name short and meaningful, such as score or count, so the blocks read like a sentence.
The frequent error is resetting the variable inside the event, which wipes the count every press and leaves the display stuck at one. If the number never grows, look for a set block where a change block belongs.
- Checkpoint: the number increases with each press and survives between presses.
Step 4: Combine two inputs with a condition
Pair the button with a second input, such as shaking the board or a light-level reading. Use a condition so the action only happens when both are true. This mirrors real robot logic: a bump sensor plus a timer, or a light reading plus a button, decides what the machine does next.
The mistake here is testing the two inputs separately and assuming they combine. Learners must trigger both at once to prove the condition works. If the action fires with only one input, the condition is not actually wrapping the action.
- Checkpoint: the action only triggers when both inputs are active at the same time.
Step 5: Build a sense-think-act loop
Now formalize the pattern you have been using all along: read an input, decide with a condition, then produce an output. Have learners write this three-part loop on paper and match each block to one part. Naming the pattern makes the jump to motors much smaller, because a motor is just another output.
The common mistake is treating the loop as a one-time sequence rather than something that repeats. If the board reacts once and then ignores further input, the program needs to keep checking rather than running the sequence a single time.
- Checkpoint: the board keeps responding to repeated input, not just the first one.
Step 6: Add a motor only after the logic works
Once learners can predict what their program will do, introduce movement. Keep the first motor program deliberately simple: one direction, one duration, one stop. The coding is already familiar, so attention goes to wiring and power, which is where the real new variables live.
The mistake is changing the code and the wiring in the same attempt. If the robot misbehaves, you will not know which change caused it. Change one thing, test, then change the next.
- Checkpoint: the robot moves exactly as the program says before you add a second behavior.
Workshop sequence at a glance
- Output first: Display one icon on the LED grid and confirm the download-and-run cycle works. If the old icon is still showing, the file did not transfer.
- Input second: Trigger a different icon from each button press. If the icon appears without a press, the display block sits outside the event.
- Memory third: Use a variable to count presses and show the number. If the count stays at one, a set block is resetting it.
- Conditions fourth: Require two inputs at once before an action fires. Test both inputs together, not one at a time.
- Loop fifth: Write the sense-think-act pattern and match blocks to each part. If it reacts once, the program is not repeating.
- Motor last: Add one movement behavior after the code is predictable. Change code or wiring, never both at once.
Products that fit this workshop
- My Robotic Pet: Coding Chameleon: It is equipped with a color sensor, infrared sensor, and RGB LEDs and can be coded and programmed in three unique play modes, including a Coding Mode that uses colorful action cards to program the pet. It is a useful next step after block-coding basics, because the same sense-think-act pattern appears with sensors and colored outputs rather than a bare LED grid.
- Gecko Run: Set of 7 Replacement Marbles: This is a pack of 7 metal replacement marbles for the Gecko Run marble run system, listed for ages 8 and up. If your workshop also runs a marble run station, spare marbles prevent a session from stalling when pieces roll under furniture.
Run the coding steps before the build steps and your workshop stops being a troubleshooting session. Learners who can predict what their program will do will debug a robot far faster than learners who are meeting logic and wiring at the same time.



