← All lessons
Getting Started

Set UpYour Board

Can a tiny board the size of a stick of gum understand Python? Not yet. Out of the box, it doesn’t speak any language you can type. In this lesson you’ll install MicroPython on it, test it, and connect it to the FusedFormations coding page. You only do this once, and every lesson after this one builds on it.

  • Grades3-8 (3-5 with a grown up)
  • Time20-30 min
  • LevelBeginner
  • Standards4 aligned
Heads up

Use a computer with Chrome or Microsoft Edge. Our coding page talks to your board through a browser feature called Web Serial. It works in Chrome and Edge on Windows, Mac, Linux and Chromebooks. It does not work in Safari, or on phones and iPads.

Top view of a Raspberry Pi Pico with the USB port, BOOTSEL button and main chip labeledRP2040USB portBOOTSEL buttonLEDBrain (processor)Pins
Fig. 1 A Raspberry Pi Pico from above. The BOOTSEL button (highlighted in blue here; it’s white on the real board) sits right next to the USB port. Holding it down while you plug in tells the board, “I want to install something new.”

Chromebooks can’t run Thonny. Email us for a board with MicroPython already installed, or do Steps 01–03 once on another computer.

You will need

ItemNotes
Microcontroller boardRaspberry Pi Pico 2 W (the board in our kits), or any Pico, Pico W, Pico 2 or ESP32-S3 board
USB data cableMicro-USB for Pico, USB-C for most ESP32-S3 boards. Charge-only cables won't work.
ComputerWindows, Mac or Linux for the one-time install (Chromebooks: see the note below the title)
ThonnyFree coding app from thonny.org

Steps

  1. Install Thonny

    Go to thonny.org, download the version for your computer, and install it like any other app. You’ll only use it in this lesson.

  2. Put MicroPython on your board

    Pick the box for your board.

    Raspberry Pi Pico 2 W, Pico, Pico W or Pico 2

    1. Hold down BOOTSEL (Fig. 1).
    2. Keep holding it while you plug the USB cable into your computer. Then let go.
    3. The board appears like a USB drive named RPI-RP2 (RP2350 on a Pico 2 or Pico 2 W).
    4. In Thonny, open Tools → Options → Interpreter. Choose MicroPython (Raspberry Pi Pico).
    5. Click Install or update MicroPython. Pick your board’s model, then click Install.
    6. The board restarts by itself. It now runs MicroPython.

    Another way: download the .uf2 file for your board from micropython.org and drag it onto the RPI-RP2 drive.

    ESP32-S3 board

    1. Plug the board into your computer.
    2. In Thonny, open Tools → Options → Interpreter. Choose MicroPython (ESP32).
    3. Click Install or update MicroPython (esptool).
    4. Pick your board’s port, choose ESP32-S3 as the family, and the latest version. Click Install.
    5. Wait for 100%. This takes a minute or two.

    Board not showing up? Hold BOOT, tap RST, then let go of BOOT. Then try the install again.

  3. Say hello

    At the bottom of Thonny is the Shell. Click in it, type this, and press Enter:

    print("Hello from my board!")

    If the words come back, your board just ran its first line of Python.

  4. Close Thonny completely

    Don’t just minimize it. Quit the app. The next figure shows why.

    Diagram: Thonny is connected to the board, so the coding page in the browser is blockedThonnystill openYour boardone USB connectionCoding page“No board found”One program at a time
    Fig. 4 Your board has one USB connection, and only one program can hold it. While Thonny has it, the coding page can’t get in. Quit Thonny and the connection is free again.

    Most “my board won’t connect” problems are just Thonny still running in the background.

  5. Connect on the FusedFormations coding page

    1. Open the FusedFormations coding page in Chrome or Edge.
    2. Click Connect. A small window lists your devices. Pick your board and click Connect.
    3. Type print("Connected!") and run it.

    The browser always asks before it lets a website talk to a USB device. That pop-up is a safety feature: no site can reach your board unless you pick it.

    You did it! Your board is ready for every lesson. From now on, you only need the coding page.

What just happened?

Your board’s processor only understands machine code: long lists of numbers. Nobody wants to write that. MicroPython is a program that lives on the board and works like a translator. You type Python, and MicroPython turns it into instructions the processor can run, right there on the board.

Flow: your Python code goes to MicroPython on the board, which controls the pins and LEDYour codeprint(“Hi”)MicroPythonthe translator,living on the boardThe hardwarepins, LEDs, sensorsover USBelectricity
Fig. 6 Installing MicroPython is like teaching the board a language. Once it knows Python, anything you type can turn into real electricity on its pins, which is where the next lesson, Hello, Pico, picks up.
How it works

Firmware

Firmware is software that lives inside a device and starts the moment it gets power. Your TV remote, microwave and game controller all run firmware. In Step 02 you replaced your board’s firmware with MicroPython, and it stays there even when the board is unplugged.

The .uf2 file you might have seen is just a package format that the Pico knows how to install when you drop it onto the board’s drive.

The story behind it

A language shrunk to fit

Python normally runs on computers with billions of bytes of memory. In 2013, physicist and programmer Damien George set out to squeeze it onto chips with only a few hundred thousand bytes. He funded the project through Kickstarter, and it became MicroPython. When Raspberry Pi released the Pico in 2021, MicroPython was one of the first languages it officially supported.

Try this next

Your board is connected, so ask it some questions. Run each line on the coding page:

2 ** 100                          # can it handle huge numbers?
import os; os.uname()             # what board am I?
import machine; machine.freq()    # how fast is my brain? (in Hz)

That last number is how many steps your board’s processor takes every second. Divide it by 1,000,000 to get megahertz. How does it compare to a laptop, which runs at billions of steps per second?

Stuck? Check these

  • Charge-only cable. The #1 problem. If the board never shows up anywhere, try a different cable.
  • Thonny is still running. Quit it fully (Fig. 4), then click Connect again.
  • Wrong browser. Use Chrome or Edge on a computer.
  • Pico not in BOOTSEL mode. Unplug, hold BOOTSEL, plug back in.
  • ESP32-S3 won’t install. Use the BOOT + RST trick from Step 02.
  • USB hub or front-panel port. Plug straight into the computer instead.

What you learned

  • What firmware is, and how MicroPython acts as a translator on the board
  • How to put a board into install mode
  • Why only one program can use the board’s connection at a time

Official docs

Further reading

  • Make: Electronics by Charles Platt (Make: / O’Reilly)A classic hands-on book that teaches electronics through experiments. Great for curious kids and the grown-ups helping them.

Standards

This lesson supports these standards from the Massachusetts Digital Literacy and Computer Science Framework and related frameworks.

  • MA DLCS 3-5.CS.a.4Identify and solve simple hardware and software problems that may occur during everyday use.
  • MA DLCS 3-5.CS.a.5Describe the differences between hardware and software.
  • MA DLCS 6-8.CS.a.3Identify and describe the function of the main internal parts of a basic computing device.
  • MA DLCS 6-8.CS.a.7Identify steps involved in diagnosing and solving routine hardware and software problems.

Next up

Hello Pico. Blink an LED with a few lines of Python.

Want a hand?

Ask a question or share a tip

Build it with us. Keep it. Explore more on your own.

Find your next build