GPIO Configurations
Thanks to the flexibility of the SAMD21 SERCOM peripheral, the Serpente boards give you access to multiple serial interfaces with just 6 GPIOs. See Pinout for an overview of the pins.
Note that most of the interfaces are easily accessible using CircuitPython, altough some of them can’t be used at the same time:
import board, busio
spi = board.SPI()
i2c = board.I2C()
uart = board.UART()
uart2 = busio.UART(board.TX2, board.RX2)
Here’s a list of some of the ways you can configure the GPIOs on your Serpente:
SPI + 3 GPIOs

I2C + 4 GPIOs

UART + 4 GPIOs

or

2x UART + 2 GPIOs

Note: Because of a quirk on CircuitPython’s implementation, you need to initialize UART 2 before UART.
SPI + I2C + 1 GPIO

SPI + UART + 1 GPIO

UART + I2C + 2 GPIOs

6 GPIOs
See Pinout.
Last modified August 5, 2024