Adafruit QT Py RP2040

The Adafruit QT Py RP2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller.

Interfaces

InterfaceHardware SupportedTinyGo Support
GPIOYESYES
UARTYESYES
SPIYESYES
I2CYESYES
ADCYESYES
PWMYESYES
USBDeviceYESYES

Pins

PinHardware pinAlternative namesPWM
SDAGPIO24I2C0_SDA_PIN, SDA_PIN, SPI1_SDI_PINPWM4 (channel A)
SCLGPIO25I2C0_SCL_PIN, SCL_PIN, SPI1_CSPWM4 (channel B)
TXGPIO20UART1_TX_PINPWM2 (channel A)
MOGPIO3MOSI, SPI0_SDO_PINPWM1 (channel B)
MIGPIO4MISO, SPI0_SDI_PINPWM2 (channel A)
SCKGPIO6SPI0_SCK_PINPWM3 (channel A)
RXGPIO5SPI0_CS, UART1_RX_PINPWM2 (channel B)
QT_SCL1GPIO23I2C1_QT_SCL_PINPWM3 (channel B)
QT_SDA1GPIO22I2C1_QT_SDA_PINPWM3 (channel A)
A0GPIO29UART0_RX_PIN, UART_RX_PIN, ADC3PWM6 (channel B)
A1GPIO28UART0_TX_PIN, UART_TX_PIN, ADC2PWM6 (channel A)
A2GPIO27I2C1_SCL_PIN, SPI1_SDO_PIN, ADC1PWM5 (channel B)
A3GPIO26I2C1_SDA_PIN, SPI1_SCK_PIN, ADC0PWM5 (channel A)
NEOPIXELGPIO12WS2812PWM6 (channel A)
NEOPIXEL_POWERGPIO11PWM5 (channel B)

Machine Package Docs

Documentation for the machine package for the Adafruit QT Py RP2040

Flashing

UF2

The QT Py RP2040 comes with the UF2 bootloader already installed.

CLI Flashing

  • Flash your TinyGo program to the board using this command:

    tinygo flash -target=qtpy-rp2040 [PATH TO YOUR PROGRAM]
    
  • The QT Py RP2040 board should restart and then begin running your program.

Troubleshooting

Any troubleshooting tips go here.

Notes

To use the Qwiic/StemmaQT port on this board with I2C drivers you’ll need to configure the I2C1 device:

i2c := machine.I2C1
i2c.Configure(machine.I2CConfig{
	SCL: machine.I2C1_QT_SCL_PIN,
	SDA: machine.I2C1_QT_SDA_PIN,
})

You can use the USB port to the QT Py RP2040 as a serial port.

TinyGo has support for the RP2040’s on-board Programmable Input/Output (PIO) block.

For more informantion, see https://.com/tinygo-org/pio

Last modified February 14, 2025: Make Qwiic port usage clear (135847b)