Upload your loadout to your bot.
You've designed three loadouts this morning. Now it's time to put a loadout on the field. Follow the five steps below to open MakeCode, add the Cutebot Pro extension, switch to JavaScript mode, and paste the match template. Then you'll change exactly two things: your four stats, and your launch sequence.
Open MakeCode and prep the project
-
Open MakeCode for micro:bitGo to makecode.microbit.org. You do not need to sign in.
-
Create a new projectClick New Project, name it
velocity-match, and hit Create. -
Add the Cutebot Pro extensionClick the gear icon (top right) → Extensions. Search for
cutebot proand click the tile to add it. New block categories appear in the sidebar when it's installed. -
Switch from Blocks to JavaScriptAt the top of the editor, you'll see a toggle with Blocks and JavaScript. Click JavaScript. The block-based workspace swaps for a text editor.
-
Replace everything with the match templateSelect all the default code (⌘ A on Mac, Ctrl A on Windows/ChromeOS) and delete it. Then paste the code from the block below using Copy template.
Don't want to copy-paste? Skip steps 1–4 and open the ready-made starter in MakeCode — the project, the Cutebot Pro extension, and the template are already set up, go straight to bringing in your launch sequence below. Or for Crosstown, use Starter Code with Launch Sequence. -
Bring in your launch sequence from your earlier projectYou already wrote a launch sequence in the First Bot Drive project. Pull it into this one:
- Open your earlier MakeCode project in a new tab (Home → your projects → the one with your launch sequence).
- At the top, click Blocks to see your launch sequence as blocks — this is the quickest way to confirm you're looking at the right function.
- Click JavaScript so you can read and copy the text.
- Find the lines between
launchActive = trueandlaunchActive = falseinsidelaunchSequence(). That's your opening-move code. Select just those lines and copy (⌘ C / Ctrl C). - Switch back to
velocity-match. In the new code, find the same spot — right where it says// ← YOUR CODE HERE. Paste your lines there.
launchActive = true/launchActive = falselines alone — they're already in place and must not be duplicated.
The code
STUDENT ZONE to jump between the two spots you need to edit.
The full match code isn't printed — it's copy-and-paste. On a computer, open this page (Day 5 · Simulation Matches) and press Copy template, or open the starter in MakeCode: makecode.microbit.org/S61177-39386-22135-51757 (starter) · makecode.microbit.org/S81289-36957-94190-01641 (with launch sequence). Then edit the two Student Zones below.
Two student zones
Zone A — Stat Allocation
Near the bottom of the code, find the lines starting with SPEED =,
ENDURANCE =, TURNING =, POWER =. Replace
the placeholder 0s with your locked values from Days 1–4.
They must add up to exactly 20.
Zone B — Launch Sequence
Near the top of the code, inside the launchSequence() function, there's a
comment line that says // ← YOUR CODE HERE. This runs once
when the match starts (Button A). Program your bot's opening move — a short drive,
a turn, whatever your team's strategy calls for.
Reuse your First Bot Drive launch code. Step 6 above walks you through
opening your earlier project, clicking Blocks to confirm, switching to JavaScript,
and copying the lines between launchActive = true and launchActive = false
into this new project.
Do not delete the launchActive = true and launchActive = false
lines in the new code — they're already in place and they protect your bot from false
border triggers while you're turning.
After the code downloads — the full startup sequence
- Compass calibration. The first time the bot powers on after a fresh download, the micro:bit asks for a compass calibration. Rotate the bot in 3D space — tilt and turn it in all directions — until every LED on the 5×5 display lights up. When the full square is filled, calibration is done and a smiley face appears. You only do this once per fresh flash.
- Enter setup mode. Press A. The bot computes stats and enters calibration. It will guide you through three steps using single-letter prompts on the LED display.
- White threshold ("W"). When you see W on the LEDs, place the bot on the darkest white square on the field — the area between border lines. Press B. Wait for the LED flash that confirms the read.
- Black threshold ("B"). When you see B on the LEDs, move the bot so its sensors are over the black border tape. Press B. Wait for the LED flash that confirms the read.
- Goal heading ("G"). When you see G on the LEDs, move the bot to its starting position and rotate it so it faces your goal. Press B. The bot stores this as the direction it will return to during the match.
- Ready check. When calibration finishes you'll see a small shape on the LEDs — the "ready" target. That means all three calibrations are stored and the bot is waiting.
- Start the match. Press A again. The bot runs the scripted launch kick, then enters the main match loop. The match auto-ends after 3 minutes (180 seconds). Press A + B together at any time for an emergency stop. Press B alone mid-match for a soft reset that re-centers the bot's behavior.