Adafruit Feather RP2040
The Adafruit Feather RP2040 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 |
---|---|---|---|---|
D4 | GPIO6 | I2C1 (SDA) | PWM3 (channel A) | |
D5 | GPIO7 | I2C1 (SCL) | PWM3 (channel B) | |
D6 | GPIO8 | UART1_TX_PIN | I2C0 (SDA) | PWM4 (channel A) |
D9 | GPIO9 | UART1_RX_PIN | I2C0 (SCL) | PWM4 (channel B) |
D10 | GPIO10 | SPI1_SCK_PIN | I2C1 (SDA) | PWM5 (channel A) |
D11 | GPIO11 | SPI1_SDO_PIN | I2C1 (SCL) | PWM5 (channel B) |
D12 | GPIO12 | SPI1_SDI_PIN | I2C0 (SDA) | PWM6 (channel A) |
D13 | GPIO13 | LED | I2C0 (SCL) | PWM6 (channel B) |
D24 | GPIO24 | I2C0_SDA_PIN | PWM4 (channel A) | |
D25 | GPIO25 | I2C0_SCL_PIN | PWM4 (channel B) | |
A0 | GPIO26 | ADC0 | I2C1 (SDA) | PWM5 (channel A) |
A1 | GPIO27 | ADC1 | I2C1 (SCL) | PWM5 (channel B) |
A2 | GPIO28 | ADC2 | PWM6 (channel A) | |
A3 | GPIO29 | ADC3 | PWM6 (channel B) | |
I2C1_SDA_PIN | GPIO2 | SDA_PIN | I2C1 (SDA) | PWM1 (channel A) |
I2C1_SCL_PIN | GPIO3 | SCL_PIN | I2C1 (SCL) | PWM1 (channel B) |
SPI0_SCK_PIN | GPIO18 | I2C1 (SDA) | PWM1 (channel A) | |
SPI0_SDO_PIN | GPIO19 | I2C1 (SCL) | PWM1 (channel B) | |
SPI0_SDI_PIN | GPIO20 | I2C0 (SDA) | PWM2 (channel A) | |
UART0_TX_PIN | GPIO0 | UART_TX_PIN | I2C0 (SDA) | PWM0 (channel A) |
UART0_RX_PIN | GPIO1 | UART_RX_PIN | I2C0 (SCL) | PWM0 (channel B) |
Machine Package Docs
Documentation for the machine package for the Adafruit Feather RP2040
Flashing
UF2
The Feather RP2040 comes with the UF2 bootloader already installed.
CLI Flashing
-
Flash your TinyGo program to the board using this command:
tinygo flash -target=feather-rp2040 [PATH TO YOUR PROGRAM]
-
The Feather RP2040 board should restart and then begin running your program.
Troubleshooting
Any troubleshooting tips go here.
Notes
You can use the USB port to the Feather RP2040 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