Provides comprehensive reference for using the Seeed Studio Expansion Board Base with XIAO microcontrollers. Covers onboard OLED display (SSD1306 128×64 I2C), RTC (PCF8563), MicroSD card slot (SPI), passive buzzer, user button, Grove connectors (I2C×2, UART×1, A0/D0×1), battery charging, and 5V servo connector. Includes Arduino and TinyGo setup, wiring, pin usage, and code examples. Use when prototyping with the multi-function XIAO expansion board. Keywords: XIAO, expansion board, base, OLED, SSD1306, RTC, PCF8563, MicroSD, SD card, buzzer, button, Grove, I2C, SPI, servo, battery, prototyping, dashboard.
therebelrobot0 星标2026年4月15日
职业
分类
销售与营销
技能内容
Provides comprehensive reference for using the Seeed Studio Expansion Board Base with XIAO microcontrollers.
When to Use
Integrating the Expansion Board Base for rapid prototyping
Using the onboard OLED display, RTC, SD card, buzzer, or button
Looking up which XIAO pins the Expansion Board occupies
Writing Arduino or TinyGo firmware for onboard peripherals
Connecting Grove sensors via the expansion board
Checking pin conflicts with other XIAO accessories
When NOT to Use
For standalone XIAO board pinouts → use the corresponding board skill
For other XIAO accessories → use the corresponding accessory skill
Accessory Overview
Parameter
Value
Type
Multi-function expansion board
Operating Voltage
相关技能
5V / 3.7V Lithium Battery
Charging Current
460mA (Max)
RTC Timer Precision
± 1.5S/DAY (25°C)
RTC Battery
CR1220
Display
0.96" OLED (SSD1306, 128×64, I2C)
Expandable Memory
MicroSD card slot
Grove Interfaces
I2C ×2, UART ×1, A0/D0 ×1
Other
Passive buzzer, user button, 5V servo connector
Size
~Half Raspberry Pi 4 size
Compatible XIAO Boards
Board
Status
Notes
XIAO SAMD21
✅
Full support
XIAO RP2040
✅
Full support
XIAO nRF52840
✅
Use SdFat library for SD card
XIAO ESP32-C3
✅
Full support
XIAO ESP32-S3
✅
Full support
XIAO nRF54L15
❌
Different SWD pins — not compatible
XIAO MG24
❌
Different SWD pins — not compatible
Pin Usage Diagram
XIAO Pin | Accessory Function | Protocol
------------|--------------------------|----------
D0 / A0 | Grove A0/D0 connector | Analog/Digital
D1 | User Button | GPIO (INPUT_PULLUP)
D2 | SD Card Chip Select (CS) | SPI
D3 / A3 | Passive Buzzer | GPIO (can be cut via trace)
D4 / SDA | I2C Data | I2C (OLED, RTC, Grove I2C)
D5 / SCL | I2C Clock | I2C (OLED, RTC, Grove I2C)
D8 | SPI Clock (SCK) | SPI (MicroSD)
D9 | SPI Data In (MISO) | SPI (MicroSD)
D10 | SPI Data Out (MOSI) | SPI (MicroSD)
TX | Grove UART TX | UART
RX | Grove UART RX | UART
Pin Conflict Warning
Pins OCCUPIED by Expansion Board
D0/A0 — Grove A0/D0 connector
D1 — User button (INPUT_PULLUP)
D2 — SD card CS
D3/A3 — Passive buzzer (can be disconnected by cutting trace)
D4/SDA — I2C bus (OLED, RTC, Grove I2C)
D5/SCL — I2C bus (OLED, RTC, Grove I2C)
D8 — SPI SCK (MicroSD)
D9 — SPI MISO (MicroSD)
D10 — SPI MOSI (MicroSD)
TX/RX — Grove UART connector
Pins remaining FREE
D6, D7
Conflicts with other accessories
COB LED Driver — conflicts on D0, D1, D2, D3, D8, D9 ❌
RS485 Board — conflicts on D2 (SD CS vs enable), D4/D5 (I2C vs UART) ❌
CAN Bus Board — conflicts on D8, D9, D10 (SPI) ❌
Grove Vision AI V2 — can share I2C bus ✅ (uses SDA/SCL)
Note: The Expansion Board uses nearly all XIAO pins. It is designed as a standalone prototyping platform, not for stacking with other GPIO-heavy accessories.
Power Requirements
Parameter
Value
Power Source
5V via USB-C
Battery
3.7V Li-Po (JST 2.0mm connector)
Charging Current
460mA max
RTC Backup
CR1220 coin cell
Battery LED
Flashing = not charging/no battery; Solid = charging
int speakerPin = D3; // A3
void setup() {
pinMode(speakerPin, OUTPUT);
}
void loop() {
// Simple tone
tone(speakerPin, 1000, 200); // 1kHz for 200ms
delay(500);
tone(speakerPin, 1500, 200); // 1.5kHz for 200ms
delay(500);
}
TinyGo Setup & Usage
TinyGo OLED Display Example
package main
import (
"machine"
"image/color"
"tinygo.org/x/drivers/ssd1306"
)
func main() {
machine.I2C0.Configure(machine.I2CConfig{
SDA: machine.SDA_PIN,
SCL: machine.SCL_PIN,
Frequency: 400000,
})
display := ssd1306.NewI2C(machine.I2C0)
display.Configure(ssd1306.Config{
Address: 0x3C,
Width: 128,
Height: 64,
})
display.ClearDisplay()
// Draw a pixel pattern
for x := int16(0); x < 128; x += 4 {
for y := int16(0); y < 64; y += 4 {
display.SetPixel(x, y, color.RGBA{R: 255})
}
}
display.Display()
println("OLED initialized (TinyGo)")
select {} // Block forever
}
TinyGo User Button Example
package main
import (
"machine"
"time"
)
func main() {
button := machine.D1
button.Configure(machine.PinConfig{Mode: machine.PinInputPullup})
led := machine.LED
led.Configure(machine.PinConfig{Mode: machine.PinOutput})
for {
if button.Get() {
led.High()
} else {
led.Low()
}
time.Sleep(10 * time.Millisecond)
}
}
TinyGo Buzzer Example
package main
import (
"machine"
"time"
)
func main() {
buzzer := machine.D3
buzzer.Configure(machine.PinConfig{Mode: machine.PinOutput})
// Simple beep pattern using manual toggling
for {
// 1kHz tone for 200ms (toggle every 500µs)
for i := 0; i < 200; i++ {
buzzer.High()
time.Sleep(500 * time.Microsecond)
buzzer.Low()
time.Sleep(500 * time.Microsecond)
}
time.Sleep(500 * time.Millisecond)
}
}
Note: For TinyGo SD card access, check tinygo.org/x/drivers for available SPI SD card drivers. The PCF8563 RTC may require a custom I2C driver in TinyGo.
Communication Protocol Details
I2C Bus (OLED + RTC + Grove)
Parameter
Value
SDA Pin
D4
SCL Pin
D5
OLED Address
0x3C (SSD1306)
RTC Address
0x51 (PCF8563)
Speed
Up to 400kHz
SPI Bus (MicroSD)
Parameter
Value
CS Pin
D2
SCK Pin
D8
MISO Pin
D9
MOSI Pin
D10
Grove Connectors
Connector
Type
XIAO Pins
Grove I2C ×2
I2C
SDA (D4), SCL (D5)
Grove UART ×1
UART
TX, RX
Grove A0/D0 ×1
Analog/Digital
A0/D0
Common Gotchas / Notes
⚠️ Plug XIAO into the middle of the two female header connectors — Incorrect placement will damage both boards.
⚠️ Plug XIAO first, then connect USB-C cable.
Buzzer on D3/A3 — Connected by default. Can be disconnected by cutting a trace on the board if D3 is needed for other purposes.
SD card CS is D2 — This is a common conflict point with other accessories.
OLED and RTC share I2C — Both are on the same I2C bus (SDA/SCL). No address conflict (OLED=0x3C, RTC=0x51).
nRF52840 SD card — Use the SdFat library instead of the built-in SD library for nRF52840.
Battery charging LED — Flashing = not charging or no battery; Solid = charging.
CircuitPython support — The board supports CircuitPython with MicroSD for library storage.
5V servo connector — Available for direct servo connection without external power.
SWD debug pins — Broken out as male headers for debugging.
Not compatible with nRF54L15 or MG24 — These boards have different SWD pin layouts.