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 3pi+ 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 3pi+ to the valid_boards section:

    valid_boards = [
        # VID  , PID,    Manufacturer string, Device name
        (0x2E8A, 0x0005, None, "Raspberry Pi Pico"),
        (0x1FFB, 0x2043, None, "Pololu 3pi+ 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 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

3pi+ 2040 Robot - Standard Edition (30:1 MP Motors), Assembled
3pi+ 2040 Robot - Turtle Edition (75:1 LP Motors), Assembled
3pi+ 2040 Robot - Hyper Edition (15:1 HPCB Motors), Assembled
3pi+ 2040 Robot Kit with 30:1 MP Motors (Standard Edition Kit)
3pi+ 2040 Robot Kit with 75:1 LP Motors (Turtle Edition Kit)
3pi+ 2040 Robot Kit with 15:1 HPCB Motors (Hyper Edition Kit)
3pi+ 2040 Control Board
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors