Adafruit Circuit Playground Express

The Adafruit Circuit Playground Express is small ARM development board based on the Atmel SAMD21 family of processors. It has several built-in devices such as WS2812 “NeoPixel” LEDs, buttons, an accelerometer, and some other sensors.

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 PWM
D0 PB09 A6, UART_RX_PIN
D1 PB08 A7, UART_TX_PIN
D2 PB02 A5, SDA_PIN
D3 PB03 A4, SCL_PIN
D4 PA28 BUTTONA, BUTTON
D5 PA14 BUTTONB, BUTTON1 TCC0 (channel 0)
D6 PA05 A1 TCC0 (channel 1)
D7 PA15 SLIDER TCC0 (channel 1)
D8 PB23 NEOPIXELS, WS2812
D9 PA06 A2 TCC1 (channel 0)
D10 PA07 A3 TCC1 (channel 1)
D12 PA02 A0
D13 PA17 LED TCC2 (channel 1), TCC0 (channel 3)
A8 PA11 LIGHTSENSOR TCC1 (channel 1), TCC0 (channel 3)
A9 PA09 TEMPSENSOR TCC0 (channel 1), TCC1 (channel 3)
A10 PA04 PROXIMITY TCC0 (channel 0)
USBCDC_DM_PIN PA24 TCC1 (channel 2)
USBCDC_DP_PIN PA25 TCC1 (channel 3)
SDA1_PIN PA00 TCC2 (channel 0)
SCL1_PIN PA01 TCC2 (channel 1)
SPI0_SCK_PIN PA21 TCC0 (channel 3)
SPI0_SDO_PIN PA20 TCC0 (channel 2)
SPI0_SDI_PIN PA16 TCC2 (channel 0), TCC0 (channel 2)
I2S_SCK_PIN PA10 TCC1 (channel 0), TCC0 (channel 2)
I2S_SD_PIN PA08 TCC0 (channel 0), TCC1 (channel 2)

Machine Package Docs

Documentation for the machine package for the Circuit Playground Express

Flashing

UF2

The Circuit Playground Express comes with the UF2 bootloader already installed.

CLI Flashing

  • Plug your Circuit Playground Express into your computer’s USB port.

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

    tinygo flash -target=circuitplay-express [PATH TO YOUR PROGRAM]
    
  • The Circuit Playground Express board should restart and then begin running your program.

Troubleshooting

If you have troubles getting your Circuit Playground Express board to receive code, try this:

  • Press the “RESET” button on the board two times to get the Circuit Playground Express board ready to receive code.

  • The Circuit Playground Express board will appear to your computer like a USB drive.

  • Now try running the command:

    tinygo flash -target=circuitplay-express [PATH TO YOUR PROGRAM]
    

Once you have updated your Circuit Playground Express board the first time, after that you should be able to flash it entirely from the command line.

Notes

You can use the USB port to the Circuit Playground Express as a serial port. UART0 refers to this connection.

The Neopixel LED on the Circuit Playground Express can be accessed using the WS2812 driver via the PB23 pin.

For an example that uses the built-in Neopixel LEDs, take a look at the TinyGo drivers repository located at https://github.com/tinygo-org/drivers/tree/release/examples