Adafruit Trinkey QT2040

The Adafruit Trinkey QT2040 is a tiny development board based on the Raspberry Pi RP2040 microcontroller.

Interfaces

Interface Hardware Supported TinyGo Support
GPIO YES YES
UART YES YES
SPI YES YES
I2C YES YES
ADC YES YES
PWM YES YES
USBDevice YES YES

Pins

Pin Hardware pin Alternative names I2C PWM
NEOPIXEL GPIO27 WS2812, ADC1 I2C1 (SCL) PWM5 (channel B)
I2C0_SDA_PIN GPIO16 I2C0 (SDA) PWM0 (channel A)
I2C0_SCL_PIN GPIO17 I2C0 (SCL) PWM0 (channel B)
ADC0 GPIO26 I2C1 (SDA) PWM5 (channel A)
ADC2 GPIO28 PWM6 (channel A)
ADC3 GPIO29 PWM6 (channel B)

Machine Package Docs

Documentation for the machine package for the Adafruit Trinkey QT2040

Flashing

UF2

The Trinkey QT2040 comes with the UF2 bootloader already installed.

CLI Flashing

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

    tinygo flash -target=trinkey-qt2040 [PATH TO YOUR PROGRAM]
    
  • The Trinkey QT2040 board should restart and then begin running your program.

Troubleshooting

Any troubleshooting tips go here.

Notes

You can use the USB port to the Trinkey QT2040 as a serial port.

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

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

Last modified September 23, 2025: microcontrollers: add I2C to listed pins (d91f731)