Parts ReferenceRP2040 MicroPython Board

RP2040 MicroPython Board

The RP2040 MicroPython Board in de:volt is a generic RP2040 development board. It runs MicroPython in the browser through an RP2040 emulator, so classroom from machine import Pin programs can drive real simulated breadboard nodes.

The RP2040 board is a workspace component: place it beside a breadboard and wire its header pins to the circuit.

Pinout

EdgePins
LeftGP0, GP1, GND, GP2, GP3, GP4, GP5, GND, GP6, GP7, GP8, GP9, GND, GP10, GP11, GP12, GP13, GND, GP14, GP15
RightVBUS, VSYS, GND, 3V3_EN, 3V3, VREF, GP28, AGND, GP27, GP26, RUN, GP22, GND, GP21, GP20, GP19, GP18, GND, GP17, GP16

GPIO pins GP0-GP22 and GP26-GP28 are available for MicroPython I/O. GP25 drives the on-board LED and is not a header pin.

Code tab

Select the RP2040 board and open the Code tab in the Inspector. The editor runs MicroPython main.py programs and includes examples for:

  • blinking the on-board LED on GP25
  • driving an external LED from GP15
  • reading a button on GP14
  • reading a potentiometer on GP26 / ADC0

Edits are drafts until you press Run. Running loads the program onto the board and stores it in the circuit. Restart reruns the last loaded program without applying unrun draft edits.

See Writing MicroPython for the shared editor workflow.

Power and logic level

The RP2040 board is USB-powered in the simulator. When USB power is enabled, the 3V3 pin provides a 3.3 V rail for breadboard circuits.

Important rules:

  • RP2040 GPIO is 3.3 V logic and is not 5 V tolerant.
  • Tie an RP2040 GND pin to the breadboard ground rail before reading or driving external circuits.
  • Use the 3V3 pin for small logic loads and sensors; do not expect a GPIO pin to power loads directly.
  • Put a series resistor on every LED driven by a GPIO pin.

GPIO, PWM, and ADC

The RP2040 model supports the common MicroPython classroom APIs:

FeaturePinsMicroPython
Digital input/outputGP0-GP22, GP26-GP28Pin(n, Pin.IN), Pin(n, Pin.OUT)
PWMAny GPIOPWM(Pin(n))
ADCGP26, GP27, GP28ADC(Pin(26)), ADC(Pin(27)), ADC(Pin(28))
On-board LEDGP25Pin(25, Pin.OUT)

Digital inputs are sampled from the connected breadboard net. ADC pins read the connected voltage and expose it through read_u16().

Example

from machine import Pin
from time import sleep
 
led = Pin(15, Pin.OUT)
 
while True:
    led.value(1)
    sleep(0.5)
    led.value(0)
    sleep(0.5)

Wire GP15 through a resistor and LED to GND to see the output blink.

Limitations

  • The simulator is focused on MicroPython machine.Pin, machine.PWM, and machine.ADC breadboard workflows.
  • C/C++ UF2 uploads are not supported from the docs workflow; use the Code tab for MicroPython.
  • Advanced RP2040 peripherals such as PIO, DMA, USB device projects, and multicore code should be treated as out of scope unless you have tested the exact program in de:volt.
  • Wireless features are not modelled.