Skip to content

Commit 45eeda9

Browse files
committed
Merge branch 'develop'
2 parents d9cb394 + 27ce53d commit 45eeda9

50 files changed

Lines changed: 3293 additions & 4551 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build(arduino-esp32:2.x)
22

33
env:
44
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
5-
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified
5+
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified,M5Unit-NFC
66

77
on:
88
push:
@@ -52,13 +52,14 @@ jobs:
5252

5353
strategy:
5454
fail-fast: false
55-
#max-parallel: 1
55+
max-parallel: 20
56+
5657
matrix:
5758
platform-url:
5859
- https://espressif.github.io/arduino-esp32/package_esp32_index.json
5960

6061
sketch:
61-
- DetectDevices
62+
- Detect
6263

6364
board:
6465
- m5stack-atom
@@ -89,6 +90,12 @@ jobs:
8990
archi: esp32
9091
platform-version: 2.0.17
9192
board: m5stack-core-esp32
93+
- sketch: NDEF
94+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
95+
platform: esp32
96+
archi: esp32
97+
platform-version: 2.0.17
98+
board: m5stack-core-esp32
9299

93100
unit:
94101
- ''

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build(arduino-esp32:3.x)
22

33
env:
44
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
5-
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified
5+
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified,M5Unit-NFC
66

77
on:
88
push:
@@ -52,13 +52,14 @@ jobs:
5252

5353
strategy:
5454
fail-fast: false
55-
#max-parallel: 1
55+
max-parallel: 20
56+
5657
matrix:
5758
platform-url:
5859
- https://espressif.github.io/arduino-esp32/package_esp32_index.json
5960

6061
sketch:
61-
- DetectDevices
62+
- Detect
6263

6364
unit:
6465
- ''
@@ -110,9 +111,15 @@ jobs:
110111
platform: esp32
111112
archi: esp32
112113
board: m5stack_core
114+
- sketch: NDEF
115+
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
116+
platform-version: 3.0.4
117+
platform: esp32
118+
archi: esp32
119+
board: m5stack_core
113120

114121
platform-version:
115-
- 3.0.4
122+
- 3.1.3
116123

117124
platform:
118125
- esp32

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build(arduino-m5stack)
22

33
env:
44
SKETCH_NAMES_FIND_START: ./examples/UnitUnified
5-
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified
5+
REQUIRED_LIBRARIES: M5Unified,M5UnitUnified,M5Unit-NFC
66

77
on:
88
push:
@@ -52,13 +52,14 @@ jobs:
5252

5353
strategy:
5454
fail-fast: false
55-
# max-parallel: 1
55+
max-parallel: 20
56+
5657
matrix:
5758
platform-url:
5859
- https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
5960

6061
sketch:
61-
- DetectDevices
62+
- Detect
6263

6364
unit:
6465
- ''
@@ -94,25 +95,31 @@ jobs:
9495
# Specific sketches
9596
- sketch: Dump
9697
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
97-
platform-version: 2.1.2
98+
platform-version: 3.2.1
9899
platform: m5stack
99100
archi: esp32
100101
board: m5stack_core
101102
- sketch: ValueBlock
102103
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
103-
platform-version: 2.1.2
104+
platform-version: 3.2.1
104105
platform: m5stack
105106
archi: esp32
106107
board: m5stack_core
107108
- sketch: ReadWrite
108109
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
109-
platform-version: 2.1.2
110+
platform-version: 3.2.1
111+
platform: m5stack
112+
archi: esp32
113+
board: m5stack_core
114+
- sketch: NDEF
115+
platform-url: https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json
116+
platform-version: 3.2.1
110117
platform: m5stack
111118
archi: esp32
112119
board: m5stack_core
113120

114121
platform-version:
115-
- 2.1.2
122+
- 3.2.1
116123

117124
platform:
118125
- m5stack

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ jobs:
5050

5151
strategy:
5252
fail-fast: false
53-
#max-parallel: 1
53+
max-parallel: 20
5454

5555
matrix:
5656
example:
57-
- DetectDevices
57+
- Detect
5858
#- Dump
5959
#- ValueBlock
6060
#- ReadWrite
@@ -130,7 +130,7 @@ jobs:
130130
board: Core
131131
framework: Arduino
132132
espressif32: latest
133-
- example: NFC
133+
- example: NDEF
134134
board: Core
135135
framework: Arduino
136136
espressif32: latest

README.md

Lines changed: 52 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,56 @@ M5UnitUnfied has a unified API and can control multiple units via PaHub, etc.
99

1010
RFID2 is a radio frequency identification unit. Built-in WS1850S chip, working frequency is 13.56MHz. Supports reading card, writing card, recognition, recording, and encoding RF card Multiple functions such as authorization and authorization. Use magnetic field induction technology to realize non-contact two-way information interaction, read and verify the information of proximity cards. It can be used in access control systems, check-in systems, warehouse goods entry and storage, and community vehicle entry and exit registration needs Application scenarios for information verification.
1111

12+
13+
## PICC Support
14+
15+
Raw R/W includes FileSystem via ISO-DEP when applicable.
16+
Support may be expanded in future updates to cover PICCs not listed here.
17+
18+
### NFC-A
19+
20+
| PICC Type | NFC Forum Tag (NDEF) | Detect | Identify | Raw R/W | Notes |
21+
|---|---|---|---|---|---|
22+
| MIFARE Classic Mini | None | Yes | Yes | Yes | Auth required |
23+
| MIFARE Classic 1K | None | Yes | Yes | Yes | Auth required |
24+
| MIFARE Classic 2K | None | Yes | Yes | Yes | Auth required |
25+
| MIFARE Classic 4K | None | Yes | Yes | Yes | Auth required |
26+
| MIFARE Ultralight | Type2 | Yes | Yes | Yes | |
27+
| MIFARE Ultralight EV1 MF0UL11 | Type2 | Yes | Yes | Yes | |
28+
| MIFARE Ultralight EV1 MF0UL21 | Type2 | Yes | Yes | Yes | |
29+
| MIFARE Ultralight Nano | Type2 | Yes | Yes | Yes | |
30+
| MIFARE Ultralight C | Type2 | Yes | Yes | Yes | |
31+
| NTAG 203 | Type2 | Yes | Yes | Yes | |
32+
| NTAG 210u | Type2 | Yes | Yes | Yes | |
33+
| NTAG 210 | Type2 | Yes | Yes | Yes | |
34+
| NTAG 212 | Type2 | Yes | Yes | Yes | |
35+
| NTAG 213 | Type2 | Yes | Yes | Yes | |
36+
| NTAG 215 | Type2 | Yes | Yes | Yes | |
37+
| NTAG 216 | Type2 | Yes | Yes | Yes | |
38+
| ST25TA512B | Type4 | Yes | Yes | Yes | ISO-DEP |
39+
| ST25TA02K | Type4 | Yes | Yes | Yes | ISO-DEP |
40+
| ST25TA16K | Type4 | Yes | Yes | Yes | ISO-DEP |
41+
| ST25TA64K | Type4 | Yes | Yes | Yes | ISO-DEP |
42+
| MIFARE Plus 2K (S/X/EV1/EV2) | None | Yes | Yes | Yes | SL0/SL1(\*1)|
43+
| MIFARE Plus 4K (S/X/EV1/EV2) | None | Yes | Yes | Yes | SL0/SL1(\*1)|
44+
| MIFARE Plus SE 1K | None | Yes | Yes | Yes | SL0/SL1/SL3|
45+
| MIFARE DESFire 2K (EV1/EV2/EV3) | Type4 | Yes | Yes | Yes | ISO-DEP |
46+
| MIFARE DESFire 4K (EV1/EV2/EV3) | Type4 | Yes | Yes | Yes | ISO-DEP |
47+
| MIFARE DESFire 8K (EV1/EV2/EV3) | Type4 | Yes | Yes | Yes | ISO-DEP |
48+
| MIFARE DESFire Light | Type4 | Yes | Yes | Yes | NDEF is not supported yet |
49+
50+
- \*1 MIFARE Plus SL3 operation has issues.
51+
52+
53+
## Emulation
54+
55+
Emulation is not supported on Unit-RFID.
56+
57+
## Known Issues
58+
59+
- MIFARE Plus SL3 operation has issues.
60+
61+
1262
## Related Link
1363

1464
- [Unit RFID2 & Datasheet](https://docs.m5stack.com/en/unit/rfid2)
@@ -18,73 +68,13 @@ RFID2 is a radio frequency identification unit. Built-in WS1850S chip, working f
1868
- [M5UnitUnified](https://github.com/m5stack/M5UnitUnified)
1969
- [M5Utility](https://github.com/m5stack/M5Utility)
2070
- [M5HAL](https://github.com/m5stack/M5HAL)
71+
- [M5Unit-NFC](https://github.com/m5stack/M5Unit-NFC)
2172

2273
## License
2374

2475
- [M5Unit-RFID -MIT](LICENSE)
2576

2677

27-
## Feature
28-
- Detection with collision resolution when multiple devices are in the detection range
29-
- Identify MIFARE and NTAG devices in detail
30-
- Support NFC-A Type-2 NDEF Read/Write
31-
32-
33-
## Usage
34-
35-
```cpp
36-
#include <M5Unified.h>
37-
#include <M5UnitUnified.h>
38-
#include <M5UnitUnifiedRFID.h>
39-
namespace {
40-
m5::unit::UnitUnified Units;
41-
m5::unit::UnitRFID2 unit;
42-
} // namespace
43-
44-
using namespace m5::rfid;
45-
46-
void setup()
47-
{
48-
M5.begin();
49-
50-
auto pin_num_sda = M5.getPin(m5::pin_name_t::port_a_sda);
51-
auto pin_num_scl = M5.getPin(m5::pin_name_t::port_a_scl);
52-
M5_LOGI("getPin: SDA:%u SCL:%u", pin_num_sda, pin_num_scl);
53-
Wire.begin(pin_num_sda, pin_num_scl, 400 * 1000U);
54-
55-
if (!Units.add(unit, Wire) || !Units.begin()) {
56-
M5_LOGE("Failed to begin");
57-
while (true) {
58-
m5::utility::delay(10000);
59-
}
60-
}
61-
M5_LOGI("M5UnitUnified has been begun");
62-
M5_LOGI("%s", Units.debugInfo().c_str());
63-
M5_LOGI("Please put the devices...");
64-
}
65-
66-
void loop()
67-
{
68-
M5.update();
69-
Units.update();
70-
auto touch = M5.Touch.getDetail();
71-
if (M5.BtnA.wasClicked() || touch.wasClicked()) {
72-
if (unit.detectDevice()) {
73-
UID uid{};
74-
if (unit.activateDevice(uid)) {
75-
M5_LOGI("UID:%s %s", uid.uidAsString().c_str(), uid.typeAsString().c_str());
76-
77-
//
78-
// Use any API...
79-
//
80-
81-
unit.deactivateDevice(); // Once activated, clean up with deactivate.
82-
}
83-
}
84-
}
85-
}
86-
```
87-
8878
## Examples
8979
See also [examples/UnitUnified](examples/UnitUnified)
9080

@@ -101,6 +91,6 @@ It will output it under docs/html
10191
If you want to output Git commit hashes to html, do it for the git cloned folder.
10292

10393
### Required
104-
- [Doxyegn](https://www.doxygen.nl/)
94+
- [Doxygen](https://www.doxygen.nl/)
10595
- [pcregrep](https://formulae.brew.sh/formula/pcre2)
10696
- [Git](https://git-scm.com/) (Output commit hash to html)

examples/UnitUnified/DetectDevices/DetectDevices.ino

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)