1
0
mirror of synced 2024-11-23 23:50:56 +01:00

没意义的修改。

This commit is contained in:
Sucareto 2022-03-06 20:29:21 +08:00
parent 0a1368292b
commit 6fd2673ef6
3 changed files with 14 additions and 8 deletions

View File

@ -1,12 +1,17 @@
#if defined(__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_ZERO)
#pragma message "当前的开发板是 ATmega32U4 或 SAMD_ZERO"
#define SerialDevice SerialUSB
#define DATA_PIN A3
#define LED_PIN A3
#elif defined(ARDUINO_ESP8266_NODEMCU_ESP12E)
#pragma message "当前的开发板是 NODEMCU_ESP12E"
#define SerialDevice Serial
#define DATA_PIN D5
#define LED_PIN D5
#elif defined(ARDUINO_NodeMCU_32S)
#pragma message "当前的开发板是 NodeMCU_32S"
#define SerialDevice Serial
#define LED_PIN 13
#else
#error "未经测试的开发板,请检查串口和阵脚定义"
@ -22,7 +27,7 @@ void setup() {
SerialDevice.begin(38400);
#endif
SerialDevice.setTimeout(0);
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(50);
FastLED.clear();
FastLED.show();

View File

@ -39,6 +39,7 @@
- banapassport 卡因为没有数据参考,所以没有支持
- 未确定`res.status`的意义,因此`res.status = 1;`可能是错误的
- 因为`get_fw`和`get_hw`返回的是自定义版本号,启动时可能触发 amdaemon 的固件升级,可以将 aime_firm 文件夹重命名或删除
- 未实现`mifare_select_tag`,未支持多卡选择,只会读到最先识别的卡片
### 引用库:

View File

@ -5,12 +5,14 @@
#if defined(__AVR_ATmega32U4__) || defined(ARDUINO_SAMD_ZERO)
#pragma message "当前的开发板是 ATmega32U4 或 SAMD_ZERO"
#define SerialDevice SerialUSB
#define DATA_PIN A3
#elif defined(ARDUINO_ESP8266_NODEMCU_ESP12E)
#pragma message "当前的开发板是 NODEMCU_ESP12E"
#define SerialDevice Serial
#define DATA_PIN D5
#elif defined(ARDUINO_NodeMCU_32S)
#pragma message "当前的开发板是 NodeMCU_32S"
#define SerialDevice Serial
#else
#error "未经测试的开发板,请检查串口和阵脚定义"
@ -20,8 +22,6 @@
PN532_I2C pn532i2c(Wire);
PN532 nfc(pn532i2c);
uint16_t systemCode = 0xFFFF;
uint8_t requestCode = 0x01;
typedef union {
uint8_t block[18];
struct {
@ -94,7 +94,7 @@ void loop() {
return;
}
if (nfc.felica_Polling(systemCode, requestCode, card.IDm, card.PMm, &card.SystemCode, 200)) {
if (nfc.felica_Polling(0xFFFF, 0x01, card.IDm, card.PMm, &card.SystemCode, 200)) {
SerialDevice.println("Felica card!");
SerialDevice.print("IDm:");
nfc.PrintHex(card.IDm, 8);