一、项目需求
-
红外传感器检测是否有人,有人的话实时检测距离,过近则报警;同时计时,超过固定时间则报警;
-
按键 1 切换工作模式:智能模式、按键模式、远程模式;
-
智能模式下,根据光照强度自动调整光照档位(低亮、中亮、高亮),没人则自动光灯;
-
按键模式下,按键 2 可以手动调整光照档位;
-
远程模式下,可以通过蓝牙控制光照档位、计时等;
-
按键 3 暂停/开始计时,按键 4 清零计时;
-
OLED 显示各项数据/状态。
二、项目框图


三、硬件部分

四、项目源码及实现
1.项目源码
https://gitee.com/GeekerGao/smart-desk-lamp
2.项目实现
