7/23/22, 9:39 PM
Seeeduino XIAO Expansion board - Seeed Wiki
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
52/66
[https://wiki.seeedstudio.com/How_to_install_Arduino_Library/]
.
Step 4
. Copy the code stick on the Aruino IDE then upload it.
Code
1
#
include
<U8x8lib.h>
2
#
include
"ATSerial.h"
3
#
include
"Protocol.h"
4
#
include
"KCT202.h"
5
6
#
define
debug SerialUSB
7
#
define
uart Serial1
8
FingerPrint_KCT202<Uart, Serial_> kct202;
9
10
Protocol_oprt oprt;
11
uint8_t
err_code =
0
;
12
uint8_t
param[
10
];
13
uint32_t
param_len;
14
15
int
Electromagnet =
0
;
16
17
U8X8_SSD1306_128X64_NONAME_HW_I2C
u8x8
(
/* reset=*/
U8X8_P
18
19
// the setup routine runs once when you press reset:
20
void
setup
() {
21
// initialize the digital pin as an output.
22
23
u8x8.begin();
24
u8x8.setFlipMode(
0
);
25
debug.begin(
115200
);
26
pinMode(Electromagnet, OUTPUT);
27
digitalWrite(Electromagnet, HIGH);
// turn the Electro
28
kct202.begin(uart, debug);
29
kct202.autoRegisterFingerPrint(
1
,
4
, LED_OFF_AFTER_GET_
30
u8x8.setFont(u8x8_font_chroma48medium8_r);
31
u8x8.setCursor(
0
,
3
);
32
u8x8.print(
"finger recording"
);