Pico-CircuitPython-Manual

From Waveshare Wiki
Jump to: navigation, search

How to Develop CircuitPython

If you are not familiar with CircuitPython, you can first study the official recommended guide "Introduction to CircuitPython for Raspberry Pi Pico (English Version)".
This guide covers the basics of getting started with CircuitPython and using the editor.

Building Developing Environment

In order to facilitate the programming, development and debugging of CircuitPython, it is recommended to use the "Mu Editor" software. You can use Mu Editor for Pico's CircuitPython development on Windows.
The following describes the development and use of Mu Editor under Windows.

Windows development environment (Mu Editor) Building & Use

  • Download and install "Mu Editor".
  • After installing, please choose "CircuitPython" when choosing the modes.
  • It may prompt that the device can't be detected after configuring as the result of the missing of CircuitPython firmware in Pico.
  • Please download CircuitPython firmware and program it to Pico.
  1. Download CircuitPython UF2 document.
  2. Press and hold the "BOOTSEL" button, and then plug the Pico to the USB port of the Raspberry Pi or other computers. You can release the button after connecting the Pico.
  3. It will be mounted as a mass storage device named "RPI-RP2".
  4. Drag and drop the CircuitPython UF2 file onto the "RPI-RP2" volume. Your Pico will reboot, a new disk drive named "CIRCUITPY" will appear, and the programming is complete.
  5. The new disk drive will have a default "code.py" file, you can open it with Mu Editor, the content in it is: "print("Hello World!")", the specific opening steps are shown in the last figure.
  6. Open the serial port, click the blank area, and press Ctrl+C, then press Ctrl+D or click the blank area of the code interface and press Ctrl+S to run the program. You can observe the running effect in the CircuitPython REPL window.