Skip to content
Robot Kit Guide
Illustrated title card for the guide: Set Up Pololu Zumo 2040 MicroPython in Thonny
setup

Set Up Pololu Zumo 2040 MicroPython in Thonny

Connect your Pololu Zumo 2040 to Thonny, run its built-in LED demo, then edit blink.py and verify the saved script from the robot's menu.

By Robot Kit Guide Editorial · ·Updated · 3 min read

The Pololu Zumo 2040 ships with MicroPython, so you can use the factory firmware for this setup. Pololu firmware guide Install the thonny-pololu plug-in, connect the robot over USB, and select Pololu Zumo 2040 Robot in Thonny’s interpreter menu. Pololu Thonny guide

Check the MicroPython drive

Connect the robot to your computer with a USB-C cable. With MicroPython installed, a drive named MicroPython should appear with Python files on it. Pololu firmware guide

Run the preloaded LED demo

You can run this demo on USB power. The robot turns on automatically over USB, and the motors require battery power. Pololu demo guide

  1. Wait for the startup splash to clear, or press C to go straight to the menu. Pololu demo guide
  2. Press A to move up or C to move down to blink.py. Press B to run it and look for the yellow LED flashing. Pololu demo guide
  3. Press Reset to return to the menu. Pololu demo guide

Connect Thonny to the Zumo interpreter

  1. Install Thonny from the Thonny website. Open Thonny and choose Tools → Manage plug-ins…. Pololu Thonny guide
  2. Search for thonny-pololu, select it, click Install, then restart Thonny. Pololu Thonny guide
  3. With the robot connected over USB, choose Pololu Zumo 2040 Robot from the interpreter menu in the lower-right corner. Thonny stops the program on the Zumo and shows a MicroPython prompt in Shell. Pololu Thonny guide
  4. Look for >>> in the Shell. Pololu’s example shows the board name, Pololu Zumo 2040 Robot, in the banner above that prompt. Pololu example code

If the Zumo option is missing, check the plug-in installation and confirm that you restarted Thonny after installing it. If Thonny fails to connect or the Shell stays blank, try clicking Stop. Pololu Thonny guide

Edit and save blink.py

  1. In Thonny, open blink.py from the robot’s MicroPython drive. Pololu Thonny guide · Pololu editing guide The Pololu plug-in disables Thonny’s remote file options. Plug-in README
  2. With the MicroPython prompt visible, press F5 to run the file. The LED should begin blinking. Press Ctrl+C to stop the program. Pololu Thonny guide
  3. The original script turns the LED on for 100 ms and off for 600 ms. Change the off interval from 600 to 100 and save blink.py back to the mounted drive. Pololu editing guide

Keep a backup copy on your computer and let the save finish before resetting or unplugging the robot. Pololu editing guide

Verify the saved script from the robot menu

  1. In Thonny’s Shell, press Ctrl+C, then Ctrl+D. This starts the demo program with a soft reboot. Pololu Thonny guide
  2. In the robot’s menu, use A or C to find blink.py and press B to launch it. The menu lists Python files at the top level of the MicroPython drive. Pololu demo guide
  3. After the edit, the LED should blink with the new pattern. Pololu editing guide

For another project, Pololu’s micropython_demo folder contains more example programs and a MicroPython library for the robot’s hardware. Pololu example code

Evidence and limits

Pololu’s Zumo 2040 User’s Guide (document 0J87) and its official plug-in and example documentation were checked on November 29, 2026. Pololu’s firmware chapter lists a Zumo 2040 build of MicroPython 1.27.0. Pololu firmware guide No hands-on testing was performed for this guide.

Sources

  1. Pololu Zumo 2040 User’s Guide §5.1, Updating the MicroPython firmware
  2. Pololu Zumo 2040 User’s Guide §5.3, Using the Thonny editor
  3. Pololu Zumo 2040 User’s Guide §4, Using the preloaded example programs
  4. Pololu’s thonny-pololu plug-in
  5. Pololu Zumo 2040 Robot example code
  6. Pololu Zumo 2040 User’s Guide §5.2, Editing Python programs

Related