Seeeduino XIAO User manual

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
1/66
Seeeduino XIAO Expansion board
[https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-board-p-
4746.html]
A powerful functional expansion board for Seeeduino XIAO of only
half Raspberry Pi 4 size. It enables build prototype and project in

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
2/66
easy and quick way. With its rich peripherals including OLED, RTC,
expandable memory, passive buzzer, RESET/User button, 5V servo
connector, multiple data interfaces… you could explore innite
possibilities of Seeeduino XIAO. Circuit python is also well
supported by this board.
As XIAO form factor, all XIAO boards support both Grove Shield for
XIAO [https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-
board-p-4746.html] and XIAO Expansion board
[https://www.seeedstudio.com/Seeeduino-XIAO-Expansion-board-p-
4746.html]. There is a slight difference between the pins and refer
to the Pinout it is easy to manage.
Seeeduino XIAO, XIAO RP2040, and XIAO BLE are compatible to the
XIAO expansion board.
Features
Quick Prototyping: Easy debug and Reset with RESET button
and SWD pin led out to male header. 0.96”OLED, enables visual
data display without PC serial monitor; Convenient plug and
play Grove connectors support multiple data protocols,
including IIC, Uart, Analog/Digital; No soldering needed with all
pin led out.
Rich peripherals: OLED display, RTC, expandable memory
space, passive buzzer, user button, on board battery
management chip.
No Soldering Needed: All pin led out. Convenient plug and play
Grove connectors support multiple data protocols, including IIC,
Uart, Analog/Digital.

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
3/66
Circuit Python Supported: Well supports circuit python.
MicroSD card slot enables memory space expand, making it
possible to allocate more libraries needed in prototyping and
project building.
Mini Size: Compact and elegant with only half Raspberry Pi 4
size, especially suitable for projects require mini size.
Specication
Item Value
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 display
Expandable memory MicroSD card
Grove Interface Grove IIC*2, Grove UART*1, A0/D0 Grove*1
Other External Equipment Passive buzzer, user button, 5V servo connector
Applications
SWD debug

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
4/66
Rapid prototyping
Data display
Mini Size Project
Part List
Item Value
SeeeduinoXIAO Expansion Board *1
Getting Started
Materials Required
Note
This product does not include Seeeduino XIAO and battery, please click
this link to get Seeeduino XIAO [https://www.seeedstudio.com/Seeeduino-
XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html?
gclid=Cj0KCQjwufn8BRCwARIsAKzP695mYBI8wwzrR8rXiJgv9QBK5DeTJG
CU9bzXvzGUheFVZxqHcuw0SgYaAqDqEALw_wcB]

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
5/66
Seeeduino XIAO Seeeduino XIAO Expansion board
Get ONE Now
[https://www.seeedstudio.com/Seeeduino-
XIAO-Arduino-Microcontroller-SAMD21-
Cortex-M0+-p-4426.html]
Get ONE Now
[https://www.seeedstudio.com/Seee
XIAO-Expansion-board-p-4746.html]
Hardware Overview
There are an external MicroSD card slot and RTC Battery Holder, the
MicroSD card mostly is used for saving and run the python.py le,

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
6/66
the RTC is for tracks the current time and can be used to program
actions at a specic time.
Pinout Diagram
External headers-pin description for Grove-Shield for Seeeduino
XIAO.

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
7/66
Expansion Board Usage
Connection
Put the Seeeduino XIAO on the expansion board, the XIAO green
LED should light up. If you want to know more about Seeeduino
XIAO, please click Seeeduino XIAO
[https://wiki.seeedstudio.com/Seeeduino-XIAO/].

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
8/66
Battery usage
The Seeeduino XIAO expansion board can be powered by a battery,
so if you do some demo that needs to be moved, that battery will
help you to solve the power supply issue. when you plug the battery
please watch out for the positive and negative anodes, follow the
picture to connect the battery in case of damage the board.
Note
Please plug the Seeeduino XIAO on the expansion board rst, then plug
Type-C, Remember pluing Seeeduino XIAO into the middle of the two
female header connectors, otherwise you will damage the Seeeduino XIAO
and the expansion board.

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
9/66
In addition, the board charged the battery when you plug the battery
cable and the type-C cable and switch the button to on.
As the below picture, if the LED ashing which means the battery
does not charge or the board does not connect battery if the LED
keeps light on which is mean the battery is charging.
Modules on the expansion board

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
10/66
Rich peripherals on board including:
OLED display: Visual data display without connecting to PC,
which enables debug in a more ecient way, and builds
application such as a sensor hub, data monitor system, etc.
RESET button: No more jumper wire and short circuit, easy
reset with just one click.
SWD debug: SWD pin led out as male pin header, making
debugger connection and rmware download much easier.
High precision RTC: High precision real-time clock with battery
backup, enable maintain accurate time when the main power is
turned off.
Expandable memory: With a MicroSD card slot on the back, no
worry on memory limit any more when adding libraries and
using circuit python.
User button: Besides the RESET button, also provide with
another user-dened button.
Passive buzzer: Same passive buzzer on Wio Terminal, with
which you could change the PMW frequency to award different
beep sound to get a "buzzer music".
Grove connectors: All pin led out, plug and play grove
connectors support common data protocols (Grove IIC*2,
Grove UART*1, A0/D0 Grove*1)
Lipo Battery Charging: JST2.0mm standard lipo battery
connector and battery management system, supports both USB
and lipo battery power supply, and easy onboard battery
recharge.

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
11/66
5V servo connector: 5V output led out to male header for 5V
servo and sensor connection.
OLED Display
This example introduces how to use the OLED display on the XIAO
expansion board.
Step 1. Install the Seeeduino XIAO on the Expansion board then
conect the Type-C cable.
Step 2. Install the u8g2 [https://github.com/olikraus/U8g2_Arduino]
library, this is the guide how to install the library
[https://wiki.seeedstudio.com/How_to_install_Arduino_Library/].

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
12/66
Step 3. Copy the code and stick on the Ardiono IDE then upload it.
OLED Code
LED control by User Button
This example introduces how to use the button on the XIAO
expansion board to control the LED on the Seeeduino XIAO.
1#include <Arduino.h>
2#include <U8x8lib.h>
3#include <Wire.h>
4
5U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* clock=*/ PIN_WI
6
7void setup(void) {
8u8x8.begin();
9u8x8.setFlipMode(1); // set number from 1 to 3, the s
10 }
11
12 void loop(void) {
13 u8x8.setFont(u8x8_font_chroma48medium8_r);
14 u8x8.setCursor(0,0);
15 u8x8.print("Hello World!");
16 }

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
13/66
Step 1. Install the Seeeduino XIAO on the Expansion board then
conect the Type-C cable.
Step 2. Open Arduino IDE, Copy the code and stick on the Ardiono
IDE then upload it.
Code
1const int buttonPin = 1;// the number of the pushbut
2int buttonState = 0;// variable for reading the
3
4void setup() {
5// initialize the LED pin as an output:
6pinMode(LED_BUILTIN, OUTPUT);
7// initialize the pushbutton pin as an input:
8pinMode(buttonPin, INPUT_PULLUP);
9
10 }
11
12 void loop() {
13 // read the state of the pushbutton value:
14 buttonState = digitalRead(buttonPin);

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
14/66
Buzzer
The Buzzer is default connected to the Pin A3, if you want to
remove the buzzer function, just follow the below picture, cut off the
line.
Play Song with Passive Buzzer
15
16 // check if the pushbutton is pressed. If it is, the bu
17 if (buttonState == HIGH) {
18 // turn LED on:
19 digitalWrite(LED_BUILTIN, HIGH);
20 }else {
21 // turn LED off:
22 digitalWrite(LED_BUILTIN, LOW);
23 }
24
25 }

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
15/66
This example uses Buzzer on the XIAO expansion board to play
Happy birthday.
Step 1. Install the Seeeduino XIAO on the Expansion board then
conect the Type-C cable.
Step 2. Open Arduino IDE, Copy the code and stick on the Ardiono
IDE then upload it.
Code
1int speakerPin = A3;
2int length = 28; // the number of notes
3char notes[] = "GGAGcB GGAGdc GGxecBA yyecdc";
4int beats[] = { 2,2,8,8,8,16,1,2,2,8,8,8,16,
5int tempo = 150;
6void playTone(int tone, int duration) {
7for (long i = 0; i < duration * 1000L; i += tone * 2) {
8digitalWrite(speakerPin, HIGH);
9delayMicroseconds(tone);
10 digitalWrite(speakerPin, LOW);
11 delayMicroseconds(tone);
12 }
13 }
14
15 void playNote(char note, int duration) {
16 char names[] = {'C', 'D', 'E', 'F', 'G', 'A', 'B',
17 'c', 'd', 'e', 'f', 'g', 'a', 'b',
18 'x', 'y'
19 };
20 int tones[] = { 1915,1700,1519,1432,1275,1136,101
21 956,834,765,593,468,346,224
22 655 ,715
23 };
24 int SPEE = 5;
25
26 // play the tone corresponding to the note name
27

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
16/66
Servo Control by Rotary Angle Sensor
This example uses a rotary angle sensor to control servo via
integration ports on the XIAO expansion board.
28 for (int i = 0;i<17; i++) {
29 if (names[i] == note) {
30 int newduration = duration / SPEE;
31 playTone(tones[i], newduration);
32 }
33 }
34 }
35
36 void setup() {
37 pinMode(speakerPin, OUTPUT);
38 }
39
40 void loop() {
41 for (int i = 0; i < length; i++) {
42 if (notes[i] == ' ') {
43 delay(beats[i] * tempo); // rest
44 } else {
45 playNote(notes[i], beats[i] * tempo);
46 }
47 // pause between notes
48 delay(tempo);
49 }
50 }

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
17/66
Step 1. Install the Seeeduino XIAO on the Expansion board then
conect the Type-C cable.
Step 2. Connect the Servo cable to I2C port, rotary angle sensor to
D0.
Step 3. Open Arduino IDE, Copy the code and stick on the Ardiono
IDE then upload it.
1#include <Servo.h>
2#define ROTARY_ANGLE_SENSOR A0
3#define ADC_REF 3 //reference voltage of ADC is 3v.If the
4#define GROVE_VCC 3 //VCC of the grove interface is norma
5#define FULL_ANGLE 300 //full value of the rotary angle i
6
7Servo myservo; // create servo object to control a servo
8// twelve servo objects can be created on most boards
9
10 int pos = 0;// variable to store the servo position
11
12 void setup() {
13 Serial.begin(9600);

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
18/66
RTC clock display
This example uses RTC to display the clock on the OLED.
14 pinMode(ROTARY_ANGLE_SENSOR, INPUT);
15 myservo.attach(5); // attaches the servo on pin 9 to t
16 }
17
18 void loop() {
19
20 float voltage;
21 int sensor_value = analogRead(ROTARY_ANGLE_SENSOR);
22 voltage = (float)sensor_value * ADC_REF / 1023;
23 float degrees = (voltage * FULL_ANGLE) / GROVE_VCC;
24 Serial.println("The angle between the mark and the star
25 Serial.println(degrees);
26 delay(50);
27 myservo.write(degrees);
28 }

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
19/66
Step 1. Install the Seeeduino XIAO on the Expansion board then
conect the Type-C cable.
Step 2. Install the u8g2 [https://github.com/olikraus/U8g2_Arduino]
and PCF8563 [https://github.com/Bill2462/PCF8563-Arduino-
Library] library, this is the guide how to install the library
[https://wiki.seeedstudio.com/How_to_install_Arduino_Library/].
Step 3. Copy the code and stick on the Ardiono IDE then upload it.
1#include <Arduino.h>
2#include <U8x8lib.h>
3#include <PCF8563.h>
4PCF8563 pcf;
5#include <Wire.h>
6
7U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* clock=*/ PIN_WI
8
9void setup() {
10 Serial.begin(115200);
11 u8x8.begin();
12 u8x8.setFlipMode(1);
13 Wire.begin();
14 pcf.init();//initialize the clock
15 pcf.stopClock();//stop the clock
16 pcf.setYear(20);//set year
17 pcf.setMonth(10);//set month
18 pcf.setDay(23);//set dat
19 pcf.setHour(17);//set hour
20 pcf.setMinut(33);//set minut
21 pcf.setSecond(0);//set second
22 pcf.startClock();//start the clock
23 }
24
25 void loop() {
26 Time nowTime = pcf.getTime();//get current time
27 u8x8.setFont(u8x8_font_chroma48medium8_r); // choose
28

7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
20/66
Acrylic Case for Seeeduino XIAO Expansion
Board
29 u8x8.setCursor(0,0);
30 u8x8.print(nowTime.day);
31 u8x8.print("/");
32 u8x8.print(nowTime.month);
33 u8x8.print("/");
34 u8x8.print("20");
35 u8x8.print(nowTime.year);
36 u8x8.setCursor(0,1);
37 u8x8.print(nowTime.hour);
38 u8x8.print(":");
39 u8x8.print(nowTime.minute);
40 u8x8.print(":");
41 u8x8.println(nowTime.second);
42 delay(1000);
43 }
Table of contents
Popular Computer Hardware manuals by other brands

Sony
Sony SMO-D501 Specification and operating instructions

ElMod
ElMod ThinkTank Tank Module PRO Instructions for Assembly and Handling

Casio
Casio FP-231CE Operation manual

Armagard
Armagard Standard V2 Setup manual

Behringer
Behringer Eurolive B1520 Pro quick start guide

Compaq
Compaq DIGITAL Server Cluster Kits for Windows NT Configuration guide