5.4. Using the Mu editor

Mu is a very simple Python editor. It does not have many configuration options or keyboard shortcuts but is great for basic editing and learning Python. With a small modification described here, Mu can connect to the Zumo 2040 and help you interact with the MicroPython interpreter running on the board.

Install the latest version from the Mu website. Before you run it, locate the install folder (on Windows, this is probably %AppData%\..\Local\Programs\Mu Editor). Search for files named “pico”:

Remove the .pyc file if it exists, and edit pico.py in a text editor. Add a line for the Zumo to the valid_boards section:

    valid_boards = [
        # VID  , PID,    Manufacturer string, Device name
        (0x2E8A, 0x0005, None, "Raspberry Pi Pico"),
        (0x1FFB, 0x2044, None, "Pololu Zumo 2040 Robot"), # <-- add this line

Start Mu. If it does not immediately identify the board, click “Mode” and choose RP2040 from the menu. Then click REPL to get to the MicroPython prompt. You can try typing some commands there:

Next, open blink.py from the robot’s drive in the Mu editor. Assuming you are still connected and see the MicroPython prompt, you can click the Run button at the top or press F5 to run it immediately. The LED should begin blinking again. To stop the program you can click in the REPL area and press Ctrl+C. Try that now and run the code again with the Run button or F5. Make some modifications and see that the blink pattern changes.

If you save your changes, you will be able to access them from the demo menu system later. To start the demo program, click in the REPL area and press Ctrl+C (to stop the running program) then Ctrl+D (“soft” reboot).

Related Products

Zumo 2040 Robot Kit (No Motors)
Zumo 2040 Robot (Assembled with 50:1 HP Motors)
Zumo 2040 Robot (Assembled with 75:1 HP Motors)
Zumo 2040 Robot (Assembled with 100:1 HP Motors)
Zumo 2040 Main Board
Zumo 2040 Front Sensor Array
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors