Skip to content

Commit 4cebcb2

Browse files
committed
Merge branch 'develop'
2 parents 9f22200 + 5461861 commit 4cebcb2

18 files changed

Lines changed: 792 additions & 149 deletions

.github/workflows/arduino-esp-v2-build-check.yml

Lines changed: 60 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,64 @@ jobs:
114114
archi: esp32
115115
platform-version: 2.0.17
116116
board: m5stack-coreink
117+
- sketch: Capture
118+
unit: HatFinger
119+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
120+
platform: esp32
121+
archi: esp32
122+
platform-version: 2.0.17
123+
board: m5stack-coreink
124+
- sketch: Characteristic
125+
unit: HatFinger
126+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
127+
platform: esp32
128+
archi: esp32
129+
platform-version: 2.0.17
130+
board: m5stack-coreink
131+
- sketch: User
132+
unit: HatFinger
133+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
134+
platform: esp32
135+
archi: esp32
136+
platform-version: 2.0.17
137+
board: m5stack-coreink
138+
139+
# FacesFinger (M-Bus, Core/Fire only)
140+
- sketch: PlotToSerial
141+
unit: FacesFinger
142+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
143+
platform: esp32
144+
archi: esp32
145+
platform-version: 2.0.17
146+
board: m5stack-core-esp32
147+
- sketch: PlotToSerial
148+
unit: FacesFinger
149+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
150+
platform: esp32
151+
archi: esp32
152+
platform-version: 2.0.17
153+
board: m5stack-fire
154+
- sketch: Capture
155+
unit: FacesFinger
156+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
157+
platform: esp32
158+
archi: esp32
159+
platform-version: 2.0.17
160+
board: m5stack-core-esp32
161+
- sketch: Characteristic
162+
unit: FacesFinger
163+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
164+
platform: esp32
165+
archi: esp32
166+
platform-version: 2.0.17
167+
board: m5stack-core-esp32
168+
- sketch: User
169+
unit: FacesFinger
170+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
171+
platform: esp32
172+
archi: esp32
173+
platform-version: 2.0.17
174+
board: m5stack-core-esp32
117175

118176
- sketch: Capture
119177
unit: UnitFinger2
@@ -163,7 +221,7 @@ jobs:
163221
version: ${{ matrix.platform-version }}
164222
libraries: ${{ steps.libs.outputs.yaml }}
165223
sketch-paths: |
166-
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ (matrix.unit == 'HatFinger') && 'UnitFinger' || matrix.unit }}/${{ matrix.sketch }}
224+
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ (matrix.unit == 'HatFinger' || matrix.unit == 'FacesFinger') && 'UnitFinger' || matrix.unit }}/${{ matrix.sketch }}
167225
cli-compile-flags: |
168226
- --build-property
169-
- build.extra_flags=${{ matrix.unit == 'HatFinger' && '-DUSING_HAT_FINGER' || (matrix.unit == 'UnitFinger' && '-DUSING_UNIT_FINGER' || '') }}
227+
- build.extra_flags=${{ matrix.unit == 'HatFinger' && '-DUSING_HAT_FINGER' || (matrix.unit == 'FacesFinger' && '-DUSING_FACES_FINGER' || (matrix.unit == 'UnitFinger' && '-DUSING_UNIT_FINGER' || '')) }}

.github/workflows/arduino-esp-v3-build-check.yml

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,57 @@ jobs:
146146
archi: esp32
147147
platform-version: 3.3.6
148148
board: m5stack_stickc_plus2
149+
- sketch: Characteristic
150+
unit: HatFinger
151+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
152+
platform: esp32
153+
archi: esp32
154+
platform-version: 3.3.6
155+
board: m5stack_stickc_plus2
156+
- sketch: User
157+
unit: HatFinger
158+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
159+
platform: esp32
160+
archi: esp32
161+
platform-version: 3.3.6
162+
board: m5stack_stickc_plus2
163+
164+
# FacesFinger (M-Bus, Core/Fire only)
165+
- sketch: PlotToSerial
166+
unit: FacesFinger
167+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
168+
platform: esp32
169+
archi: esp32
170+
platform-version: 3.3.6
171+
board: m5stack_core
172+
- sketch: PlotToSerial
173+
unit: FacesFinger
174+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
175+
platform: esp32
176+
archi: esp32
177+
platform-version: 3.3.6
178+
board: m5stack_fire
179+
- sketch: Capture
180+
unit: FacesFinger
181+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
182+
platform: esp32
183+
archi: esp32
184+
platform-version: 3.3.6
185+
board: m5stack_core
186+
- sketch: Characteristic
187+
unit: FacesFinger
188+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
189+
platform: esp32
190+
archi: esp32
191+
platform-version: 3.3.6
192+
board: m5stack_core
193+
- sketch: User
194+
unit: FacesFinger
195+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
196+
platform: esp32
197+
archi: esp32
198+
platform-version: 3.3.6
199+
board: m5stack_core
149200

150201
# UnitFinger2 extra sketches
151202
- sketch: Capture
@@ -196,7 +247,7 @@ jobs:
196247
version: ${{ matrix.platform-version }}
197248
libraries: ${{ steps.libs.outputs.yaml }}
198249
sketch-paths: |
199-
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ (matrix.unit == 'HatFinger') && 'UnitFinger' || matrix.unit }}/${{ matrix.sketch }}
250+
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ (matrix.unit == 'HatFinger' || matrix.unit == 'FacesFinger') && 'UnitFinger' || matrix.unit }}/${{ matrix.sketch }}
200251
cli-compile-flags: |
201252
- --build-property
202-
- build.extra_flags=${{ matrix.unit == 'HatFinger' && '-DUSING_HAT_FINGER' || (matrix.unit == 'UnitFinger' && '-DUSING_UNIT_FINGER' || '') }}
253+
- build.extra_flags=${{ matrix.unit == 'HatFinger' && '-DUSING_HAT_FINGER' || (matrix.unit == 'FacesFinger' && '-DUSING_FACES_FINGER' || (matrix.unit == 'UnitFinger' && '-DUSING_UNIT_FINGER' || '')) }}

.github/workflows/arduino-m5-build-check.yml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,43 @@ jobs:
172172
platform-version: 3.2.5
173173
board: m5stack_stickc_plus2
174174

175+
# FacesFinger (M-Bus, Core/Fire only)
176+
- sketch: PlotToSerial
177+
unit: FacesFinger
178+
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
179+
platform: m5stack
180+
archi: esp32
181+
platform-version: 3.2.5
182+
board: m5stack_core
183+
- sketch: PlotToSerial
184+
unit: FacesFinger
185+
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
186+
platform: m5stack
187+
archi: esp32
188+
platform-version: 3.2.5
189+
board: m5stack_fire
190+
- sketch: Capture
191+
unit: FacesFinger
192+
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
193+
platform: m5stack
194+
archi: esp32
195+
platform-version: 3.2.5
196+
board: m5stack_core
197+
- sketch: Characteristic
198+
unit: FacesFinger
199+
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
200+
platform: m5stack
201+
archi: esp32
202+
platform-version: 3.2.5
203+
board: m5stack_core
204+
- sketch: User
205+
unit: FacesFinger
206+
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
207+
platform: m5stack
208+
archi: esp32
209+
platform-version: 3.2.5
210+
board: m5stack_core
211+
175212
# UnitFinger2 extra sketches
176213
- sketch: Capture
177214
unit: UnitFinger2
@@ -221,7 +258,7 @@ jobs:
221258
version: ${{ matrix.platform-version }}
222259
libraries: ${{ steps.libs.outputs.yaml }}
223260
sketch-paths: |
224-
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ (matrix.unit == 'HatFinger') && 'UnitFinger' || matrix.unit }}/${{ matrix.sketch }}
261+
- ${{ env.SKETCH_NAMES_FIND_START }}/${{ (matrix.unit == 'HatFinger' || matrix.unit == 'FacesFinger') && 'UnitFinger' || matrix.unit }}/${{ matrix.sketch }}
225262
cli-compile-flags: |
226263
- --build-property
227-
- build.extra_flags=${{ matrix.unit == 'HatFinger' && '-DUSING_HAT_FINGER' || (matrix.unit == 'UnitFinger' && '-DUSING_UNIT_FINGER' || '') }}
264+
- build.extra_flags=${{ matrix.unit == 'HatFinger' && '-DUSING_HAT_FINGER' || (matrix.unit == 'FacesFinger' && '-DUSING_FACES_FINGER' || (matrix.unit == 'UnitFinger' && '-DUSING_UNIT_FINGER' || '')) }}

.github/workflows/platformio-build-check.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,33 @@ jobs:
142142
espressif32: latest
143143

144144

145+
# FacesFinger (M-Bus, Core/Fire only)
146+
- example: PlotToSerial
147+
unit: FacesFinger
148+
board: Core
149+
framework: Arduino
150+
espressif32: latest
151+
- example: PlotToSerial
152+
unit: FacesFinger
153+
board: Fire
154+
framework: Arduino
155+
espressif32: latest
156+
- example: Capture
157+
unit: FacesFinger
158+
board: Core
159+
framework: Arduino
160+
espressif32: latest
161+
- example: Characteristic
162+
unit: FacesFinger
163+
board: Core
164+
framework: Arduino
165+
espressif32: latest
166+
- example: User
167+
unit: FacesFinger
168+
board: Core
169+
framework: Arduino
170+
espressif32: latest
171+
145172
- example: Capture
146173
unit: UnitFinger2
147174
board: Core

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Unit Finger is a fingerprint recognition sensor. It integrates the FPC1020A capa
1313
Hat Finger is a fingerprint recognition sensor. It integrates the FPC1020SC capacitive fingerprint recognition module, featuring multi-fingerprint entry, image processing, feature extraction, fingerprint matching, and search functions.
1414

1515

16+
### SKU:A066
17+
Faces Finger is a fingerprint recognition panel compatible with the FACE kit. It integrates the FPC1020A capacitive fingerprint recognition module internally, featuring functions such as multi-fingerprint enrollment, image processing, feature extraction, fingerprint comparison, and search. It supports setting different security levels, providing a stable and reliable mechanism for fingerprint addition, verification, and management for your projects.
18+
1619
### SKU:U203
1720
The Unit Fingerprint2 is a high-performance fingerprint recognition sensor unit, internally integrating an STM32 core controller and an A-K323CP all-in-one fingerprint recognition module. It uses a semiconductor capacitive sensor with functions such as fingerprint acquisition, feature extraction, registration, comparison, storage, and retrieval.
1821

@@ -21,6 +24,7 @@ See also examples using conventional methods here.
2124

2225
- [Unit Finger Document & Datasheet](https://docs.m5stack.com/en/unit/finger)
2326
- [Hat Finger Document & Datasheet](https://docs.m5stack.com/en/hat/hat-finger)
27+
- [Faces Finger Document & Datasheet](https://docs.m5stack.com/en/module/faces_finger)
2428
- [Unit Fingerprint2 Document & Datasheet](https://docs.m5stack.com/en/unit/Unit_Fingerprint2)
2529

2630

@@ -42,16 +46,18 @@ See also [examples/UnitUnified](examples/UnitUnified)
4246
You must choose a define symbol for the unit you will use.
4347
(Rewrite source or specify with compile options)
4448

45-
- UnitFinger / HatFinger examples (PlotToSerial / Capture / Characteristic / User)
49+
- UnitFinger / HatFinger / FacesFinger examples (PlotToSerial / Capture / Characteristic / User)
4650
```cpp
4751
// *************************************************************
4852
// Choose one define symbol to match the unit you are using
4953
// *************************************************************
50-
#if !defined(USING_UNIT_FINGER) && !defined(USING_HAT_FINGER)
51-
// For UnitFinger (U008)
54+
#if !defined(USING_UNIT_FINGER) && !defined(USING_HAT_FINGER) && !defined(USING_FACES_FINGER)
55+
// For UnitFinger (SKU:U008)
5256
// #define USING_UNIT_FINGER
53-
// For HatFinger (U074)
57+
// For HatFinger (SKU:U074)
5458
// #define USING_HAT_FINGER
59+
// For FacesFinger (SKU:A066)
60+
// #define USING_FACES_FINGER
5561
#endif
5662
```
5763

examples/UnitUnified/UnitFinger/Capture/main/Capture.cpp

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
// *************************************************************
1515
// Choose one define symbol to match the unit you are using
1616
// *************************************************************
17-
#if !defined(USING_UNIT_FINGER) && !defined(USING_HAT_FINGER)
18-
// For UnitFinger (U008)
17+
#if !defined(USING_UNIT_FINGER) && !defined(USING_HAT_FINGER) && !defined(USING_FACES_FINGER)
18+
// For UnitFinger (SKU:U008)
1919
// #define USING_UNIT_FINGER
20-
// For HatFinger (U074)
20+
// For HatFinger (SKU:U074)
2121
// #define USING_HAT_FINGER
22+
// For FacesFinger (SKU:A066)
23+
// #define USING_FACES_FINGER
2224
#endif
2325
// *************************************************************
2426

@@ -33,6 +35,8 @@ m5::unit::UnitUnified Units;
3335
m5::unit::UnitFinger unit;
3436
#elif defined(USING_HAT_FINGER)
3537
m5::unit::HatFinger unit;
38+
#elif defined(USING_FACES_FINGER)
39+
m5::unit::UnitFacesFinger unit;
3640
#else
3741
#error Please choose unit!
3842
#endif
@@ -82,6 +86,26 @@ UartPins get_hat_uart_pins(const m5::board_t board)
8286
}
8387
#endif
8488

89+
#if defined(USING_FACES_FINGER)
90+
// M-Bus pins for Faces Finger (GPIO varies by board)
91+
struct FacesPins {
92+
int rx; // UART RX (mbus_pin15)
93+
int tx; // UART TX (mbus_pin16)
94+
int panel_power; // Panel power (mbus_pin10)
95+
int touch_power; // Touch IC power (mbus_pin20)
96+
};
97+
98+
FacesPins get_faces_pins()
99+
{
100+
switch (M5.getBoard()) {
101+
case m5::board_t::board_M5Stack: // Core/Gray/Fire
102+
return {16, 17, 26, 5};
103+
default:
104+
return {-1, -1, -1, -1};
105+
}
106+
}
107+
#endif
108+
85109
} // namespace
86110

87111
void setup()
@@ -112,6 +136,25 @@ void setup()
112136
}
113137
auto pin_num_in = pins.rx;
114138
auto pin_num_out = pins.tx;
139+
#elif defined(USING_FACES_FINGER)
140+
const auto fp = get_faces_pins();
141+
M5_LOGI("getFacesPin: RX:%d TX:%d PWR:%d TCH:%d", fp.rx, fp.tx, fp.panel_power, fp.touch_power);
142+
if (fp.rx < 0 || fp.tx < 0) {
143+
M5_LOGE("No M-Bus on this board");
144+
lcd.fillScreen(TFT_RED);
145+
while (true) {
146+
m5::utility::delay(10000);
147+
}
148+
}
149+
auto pin_num_in = fp.rx;
150+
auto pin_num_out = fp.tx;
151+
152+
{
153+
auto cfg = unit.config();
154+
cfg.panel_power_pin = fp.panel_power;
155+
cfg.touch_power_pin = fp.touch_power;
156+
unit.config(cfg);
157+
}
115158
#else
116159
auto pin_num_in = M5.getPin(m5::pin_name_t::port_c_rxd);
117160
auto pin_num_out = M5.getPin(m5::pin_name_t::port_c_txd);

0 commit comments

Comments
 (0)