更新 Dorm-Air-Conditioner-Smart-Controller.ino
This commit is contained in:
parent
8728684d67
commit
35507e06d7
@ -1,3 +1,6 @@
|
||||
//使用preferences作为数据持久化方案,类似于本项目的数据库
|
||||
#include <Preferences.h>
|
||||
|
||||
#include "DHT11control.h"
|
||||
|
||||
#include "RTC_Module.h"
|
||||
@ -10,6 +13,11 @@ void setup() {
|
||||
// 初始化串口通信
|
||||
Serial.begin(115200);
|
||||
|
||||
Preferences prefs; // 声明Preferences对象
|
||||
|
||||
//打开preferences命名空间:DACSC
|
||||
prefs.begin("DACSC");
|
||||
|
||||
// 启动DHT传感器
|
||||
dht.begin();
|
||||
// 启动ds1302
|
||||
|
Loading…
x
Reference in New Issue
Block a user