Today Schedule Teacher resources Tools Math concepts
Simulation matches · Day 5

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

  1. Open MakeCode for micro:bit
    Go to makecode.microbit.org. You do not need to sign in.
  2. Create a new project
    Click New Project, name it velocity-match, and hit Create.
  3. Add the Cutebot Pro extension
    Click the gear icon (top right) → Extensions. Search for cutebot pro and click the tile to add it. New block categories appear in the sidebar when it's installed.
  4. Switch from Blocks to JavaScript
    At 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.
  5. Replace everything with the match template
    Select 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.
  6. Bring in your launch sequence from your earlier project
    You already wrote a launch sequence in the First Bot Drive project. Pull it into this one:
    1. Open your earlier MakeCode project in a new tab (Home → your projects → the one with your launch sequence).
    2. 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.
    3. Click JavaScript so you can read and copy the text.
    4. Find the lines between launchActive = true and launchActive = false inside launchSequence(). That's your opening-move code. Select just those lines and copy (⌘ C / Ctrl C).
    5. Switch back to velocity-match. In the new code, find the same spot — right where it says // ← YOUR CODE HERE. Paste your lines there.
    Leave the two launchActive = true / launchActive = false lines alone — they're already in place and must not be duplicated.

The code

Read the comments. They tell you which lines never to delete. Search (⌘ F) for STUDENT ZONE to jump between the two spots you need to edit.

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.

Do not change anything outside the two zones. The rest of the code runs match timing, ball detection, border handling, and charge/follow-through. If something feels "wrong" outside the zones, raise your hand — don't edit it.

After the code downloads — the full startup sequence

Downloading the code is not the last step. Before you press A to start the match, the bot has to calibrate three things: its own compass, the light/dark threshold of the field, and the heading to your goal. Follow this sequence in order.
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
Record what you see in your match log: how long did Endurance hold? Did your launch put you in a good position? Did the 5 Turning value make your arcs feel too tight or too wide? You'll adjust for tomorrow's matches — but your Week 1 loadout itself is locked.