edit

# Seeed Studio XIAO RP2040 with CircuitPython¶

CircuitPython is a programming language designed to simplify experimenting and learning to program on low-cost microcontroller boards. It makes getting started easier than ever with no upfront desktop downloads needed. Once you get your board set up, open any text editor, and get started editing code. It's that simple.

## Getting Started¶

### Installation¶

Step 1 Enter Bootloader Mode

Before we install CircuitPython to Seeed Studio XIAO RP2040, it requires bootloader mode. We can enter the bootloader mode by the following operation:

• Long press the "BOOT" button. (The "B" is written on the board shown to the right)
• Connect the Seeed Studio XIAO PR2040 to your computer while you still pressing the button.
• The computer then will appear a disk driver(RP1-RP2)

The disk shows up(RP1-RP2):

Step 2 Downloard the firmware for Seeed Studio XIAO RP2040

Step 3 Drag the .urf file to the disk driver("RP1-RP2")

Step 4 Check the disk drive if the name has changed to "CIRCUITPY".

Now you have successfully installed the CircuitPython to the Seeed Studio XIAO RP2040 board.

### LED Flash Tutorial¶

Step 1 Download CircuitPython editor - Mu Editor

Step 2 Open and chose the mode as "CircuitPython"

Step 3 Copy and upload the following codes:

"""Example for Pico. Blinks the built-in LED."""
import time
import board
import digitalio

led = digitalio.DigitalInOut(board.LED)
led.direction = digitalio.Direction.OUTPUT

while True:
led.value = True
time.sleep(0.5)
led.value = False
time.sleep(0.5)


Click "Serial" to open REPL, move the codes to REPL

The user LED on Seeed Studio XIAO RP2040 then will flash.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.38403308391571045, "perplexity": 26505.105615755794}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-40/segments/1664030337244.17/warc/CC-MAIN-20221002021540-20221002051540-00136.warc.gz"}