Program your LEGO® SPIKE Prime robot with blocks

Snap blocks together, see the Python they make, and run it on your hub. MatPilot is free, runs in your browser, and needs no account. It is made for classrooms and robot competitions.

Start with blocksRead the Docs

The Blocks page: blocks on the left, their Python on the right.

Get started in four steps

  1. A computer

    With Chrome or Edge, on Windows, macOS, ChromeOS or Android. iPads, iPhones and Firefox cannot connect to a hub.

  2. Pybricks on the hub

    Once, with a USB cable: see below.

  3. Connect

    Turn the hub on, press Connect hub and choose your hub.

  4. Blocks and Run

    Snap blocks together and press Run. The hub does what they say.

Put Pybricks on your hub

MatPilot talks to hubs that run Pybricks, free firmware made by the Pybricks team. You put it on the hub once, with a USB cable; after that MatPilot connects over Bluetooth. Pybricks’ own installer does the work:

  1. Open the installer. On a computer with Chrome or Edge, go to code.pybricks.com, open its tools menu and choose Install Pybricks Firmware. It asks a few questions first: the hub (SPIKE Prime), the licences, and a name for the hub.
  2. Get the hub ready. Turn the hub off and unplug its USB cable.
  3. Hold the Bluetooth button on the hub, and keep holding it.
  4. Plug in the USB cable (micro-USB) between the hub and the computer.
  5. Wait for the light. When the Bluetooth light blinks pink, green, blue, let go of the button.
  6. Choose the hub. In the browser’s pop-up, choose “LEGO Technic Large Hub in DFU Mode” and press Connect. Wait until the installer says it is done.

Open the Pybricks installerPybricks’ guide, with a video

The Blocks page

More about blocks, with pictures

Robots and mats

Built on Pybricks

MatPilot could not exist without Pybricks, free and open-source software for LEGO® hubs, made by Laurens Valk and David Lechner with contributors around the world. Pybricks does the hard parts; MatPilot adds blocks, robots and mats on top:

Pybricks is free for everyone, and it stays that way through its supporters. If MatPilot helps your team, please sponsor Pybricks on GitHub or on Patreon.

pybricks.comPybricks on GitHubSupport Pybricks

MatPilot is not made by the Pybricks team. Please ask about MatPilot on MatPilot’s GitHub, not them.

Check this computer and your hub

For grown-ups setting up. Write MicroPython yourself on Program & Monitor; testing with a real hub, the hardware test walks through each check and makes a report.

1. Device compatibility

Checking this browser…

2. Hub probe

Connects to a LEGO SPIKE Prime hub running Pybricks firmware and reads its name, firmware revision, and protocol version. Read-only: MatPilot does not write anything to the hub. Tested with Pybricks v4.0.1.

Connect to hub is available once the compatibility checks finish.

Turn on the hub, then click Connect to hub. The browser lists only nearby hubs running Pybricks firmware.