lonelyion / dorm-room-helper

[deprecated] An integrated IoT system of school dorm room. Including NFC unlocking, security alert, remote appliances control, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dorm-room-helper

可交互宿舍门禁与电器安全使用管理系统,硬件基于ESP32.

Dependencies

这个项目使用了以下库:

Build

这个项目使用的开发平台是PlatformIO,因此需要配置好PlatformIO Core或者PlatformIO IDE(其实就是一个VS Code插件),本部分请参阅官方文档,此处不再赘述。

首先需要在include目录下新建一个文件secrets.h,然后写入以下内容并将数组内容替换为将要允许放行的NFC UIDs。NFC卡片的UID可以通过打开NFC类的show_debug_info在串口输出里面得到,也可以通过其他读卡器及其配套软件得到。

#ifndef _SECRETS_H
#define _SECRETS_H

//NFC 允许放行的白名单列表
#define _ALLOW_LIST {   \
    {0x00, 0x00, 0x00, 0x01}, {0x00, 0x00, 0x00, 0x02}, {0x00, 0x00, 0x00, 0x03},    \
    {0x00, 0x00, 0x00, 0x04}, {0x00, 0x00, 0x00, 0x05}  \
}

//WiFi SSID和连接密码
#define _WIFI_SSID "ssid"
#define _WIFI_PASSWORD "password"

//是否开启夜间省电(默认00:30~07:00)
#define _ENABLE_SLEEP true

#endif

之后点击VS Code下方的Build或在CLI中执行pio run,再点击Upload或者CLI中执行pio run --target upload就可以将编译好的程序烧录到板子上了。

License

MIT License

About

[deprecated] An integrated IoT system of school dorm room. Including NFC unlocking, security alert, remote appliances control, etc.

License:MIT License


Languages

Language:C++ 82.0%Language:Processing 17.1%Language:C 0.9%