Code Monkey home page Code Monkey logo

nfc_door's Introduction

使用Arduino编译上传,自行配置ESP8266的环境,并添加依赖库MFRC522

RC522读取卡片卡号,若该卡号与录入卡号所匹配,则驱动舵机完成开门。

建议使用手机NFC、手环NFC、校园卡作为开门钥匙。

  • Reset按钮

    按下后清除目前录入的所有卡号,即清除固件LFS下的文件。

  • 录入模式按钮

    按一下后LED灯会常亮,表示进入录入模式,再按一下则LED灯熄灭,表示退出录入模式。在录入模式下,读取的卡片的卡号会写入固件LFS下的文件,即录入卡号,且断电后所录入的卡号不会消失。

针脚定义修改

#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

按钮接线图解

pic

NodeMCU开发版

pic

nfc_door's People

Contributors

henvy-mango avatar imgbotapp avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.