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
5
U8X8_SSD1306_128X64_NONAME_HW_I2C
u8x8
(
/* clock=*/
PIN_WI
6
7
void
setup
(
void
) {
8
u8x8.begin();
9
u8x8.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
}