Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/henvy-mango/nfc_door
Use NodeMCU + RC522 to drive a servo.
https://github.com/henvy-mango/nfc_door
arduino esp8266 nfc nodemcu
Last synced: about 1 month ago
JSON representation
Use NodeMCU + RC522 to drive a servo.
- Host: GitHub
- URL: https://github.com/henvy-mango/nfc_door
- Owner: Henvy-Mango
- License: mit
- Created: 2020-10-14T08:09:44.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-04T13:55:50.000Z (over 2 years ago)
- Last Synced: 2024-04-28T06:26:45.318Z (9 months ago)
- Topics: arduino, esp8266, nfc, nodemcu
- Language: C++
- Homepage:
- Size: 1.23 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
使用[Arduino](https://www.arduino.cc/en/Main/Software)编译上传,[自行配置ESP8266](https://www.jianshu.com/p/cb0274d612b5)的环境,并添加依赖库[MFRC522](https://github.com/miguelbalboa/rfid)
RC522读取卡片卡号,若该卡号与录入卡号所匹配,则驱动舵机完成开门。
建议使用***手机NFC、手环NFC、校园卡***作为开门钥匙。
- **Reset按钮**
按下后清除目前录入的所有卡号,即清除固件LFS下的文件。
- **录入模式按钮**
按一下后LED灯会常亮,表示进入录入模式,再按一下则LED灯熄灭,表示退出录入模式。在录入模式下,读取的卡片的卡号会写入固件LFS下的文件,即录入卡号,且断电后所录入的卡号不会消失。
> 针脚定义修改
```C
#define RST_PIN 5 // 配置针脚
#define SS_PIN 4
#define SERVO_PIN 15
#define LED_PIN 16 // RST按键上方LED
//LED_BUILTIN 4 天线下方LED
#define BT1_PIN 2 // 录入模式
#define BT2_PIN 0 // 重置String uid[15][1]; //最多保存15张卡片,有需要可以修改
```> 接线图解
![pic](https://cdn.jsdelivr.net/gh/Henvy-Mango/nfc_door@latest/layout.png)
> 按钮接线图解
![pic](https://cdn.jsdelivr.net/gh/Henvy-Mango/nfc_door@latest/layout-button.png)
> NodeMCU开发版
![pic](https://cdn.jsdelivr.net/gh/Henvy-Mango/nfc_door@latest/nodemcu.png)