8301| 18
|
[项目] 基于视觉识别的测温放聚集场馆控制系统 |
视频演示: 【项目背景】 2020年新冠疫情肆虐,为了防范疫情,有效控制疫情的传播,人们对一些场馆实行了封闭。但是对于有些没法封闭的场馆,也是提出了一些要求。例如戴口罩、测体温、不聚集等。于是我们设计了一款针对此区域的控制系统——基于视觉识别的测温防聚集场馆控制系统。 【项目展示】 【功能简介】 (1)人脸识别,测温预警:检测人脸是否已经登记且体温正常,打开大门放行。 (2)放聚集提醒:根据防疫要求,当摄像头画面在指定的区域内出现的人数超过三个,进行提示。 (3)语音播报:系统带有语音播报功能 【硬件材料】
【制作过程】 1.系统设计:本场馆控制系统使用HuskyLens AI 视觉传感器识别人脸,通过非接触温度传感器检测人体体温,当两者都满足时放行;进入场馆内时,当在一定区域出现3个人脸的画面,系统认为此时出现了人员聚集,语音报备不要聚集。 2.结构设计 3.电路连线: 4.代码编写 代码编写如下所示分为人脸识别测温程序和信息反馈程序、防聚集程序。 (1)人脸识别测温程序(主程序和子程序) [mw_shl_code=cpp,false]/*! * MindPlus * uno * */ #include <UNO_Obloq.h> #include <SoftwareSerial.h> #include <DFRobot_SYN6288.h> #include <DFRobot_MLX90614.h> #include <DFRobot_HuskyLens.h> // 静态常量 const String topics[5] = {"wsiSWUWMR","","","",""}; // 创建对象 UNO_Obloq olq; SoftwareSerial softSerial(2, 3); DFRobot_HuskyLens huskylens; DFRobot_SYN6288 syn6288; DFRobot_MLX90614 mlx90614; // 主程序开始 void setup() { softSerial.begin(9600); olq.startConnect(&softSerial, "SRZX-WIFI", "20131209", "BJm0d8awUG", "HkVCuIaDUM", topics, "iot.dfrobot.com.cn", 1883); huskylens.beginI2CUntilSuccess(); huskylens.writeAlgorithm(ALGORITHM_FACE_RECOGNITION); syn6288.begin(&Serial, 0, 1, 4); syn6288.setVolume(true, 16); syn6288.playText("系统初始化成功", 1); } void loop() { huskylens.request(); if ((huskylens.isAppear(1,HUSKYLENSResultBlock) && (mlx90614.getObjectTempC()<37))) { syn6288.playText((String("NO1温度") + String(mlx90614.getObjectTempC())), 0); olq.publish(olq.topic_0, "NO1"); digitalWrite(7, HIGH); delay(2000); digitalWrite(7, LOW); } if ((huskylens.isAppear(2,HUSKYLENSResultBlock) && (mlx90614.getObjectTempC()<37))) { syn6288.playText((String("NO2温度") + String(mlx90614.getObjectTempC())), 0); olq.publish(olq.topic_0, "NO2"); digitalWrite(7, HIGH); delay(2000); digitalWrite(7, LOW); } if ((huskylens.isAppear(3,HUSKYLENSResultBlock) && (mlx90614.getObjectTempC()<37))) { syn6288.playText((String("NO3温度") + String(mlx90614.getObjectTempC())), 0); olq.publish(olq.topic_0, "NO3"); digitalWrite(7, HIGH); delay(2000); digitalWrite(7, LOW); } if ((huskylens.isAppear(4,HUSKYLENSResultBlock) && (mlx90614.getObjectTempC()<37))) { syn6288.playText((String("NO4温度") + String(mlx90614.getObjectTempC())), 0); olq.publish(olq.topic_0, "NO4"); digitalWrite(7, HIGH); delay(2000); digitalWrite(7, LOW); } if ((30<mlx90614.getObjectTempC())) { syn6288.playText((String("体温异常") + String(mlx90614.getObjectTempC())), 0); huskylens.takePhotoToSDCard(); olq.publish(olq.topic_0, "X"); digitalWrite(7, LOW); delay(2000); } } [/mw_shl_code] 信息反馈程序 [mw_shl_code=cpp,false]/*! * MindPlus * mpython * */ #include <MPython.h> #include <DFRobot_Iot.h> // 函数声明 void obloqMqttEventT0(String& message); // 静态常量 const String topics[5] = {"wsiSWUWMR","","","",""}; const MsgHandleCb msgHandles[5] = {obloqMqttEventT0,NULL,NULL,NULL,NULL}; const uint8_t imageMatrix[][768] = { {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xf4,0xf,0xbf,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xc0,0x0,0x3,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xcf,0x81,0x0,0x0,0x3f,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0x1c,0x0,0x0,0x0,0x3,0xff,0xff,0xff,0xfe,0xff,0xff,0xfb,0x0,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xfe,0xff,0xff,0xfc,0x4,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xfe,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x7,0xff,0xff,0xfe,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x0,0x7,0xff,0xff,0xfe,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xfe,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xff,0xfe,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0xfe,0xff,0xff,0x0,0x0,0x0,0xb,0x80,0x0,0x0,0x3f,0xff,0xfe,0xff,0xfe,0x0,0x0,0x1f,0xff,0xfc,0x0,0x0,0x3f,0xff,0xfe,0xff,0xff,0x80,0x0,0xff,0xff,0xff,0xc0,0x0,0xf,0xff,0xfe,0xff,0xff,0x0,0x3,0xff,0xff,0xff,0xf8,0x0,0x7,0xff,0xfe,0xff,0xff,0x0,0x7,0xff,0xff,0xff,0xfc,0x0,0x3,0xff,0xfe,0xff,0xfe,0x0,0xf,0xff,0xff,0xff,0xff,0x0,0x3,0xff,0xfe,0xff,0xfe,0x0,0xf,0xff,0xff,0xff,0xff,0x0,0x1,0xff,0xfe,0xff,0xfe,0x0,0xf,0xff,0xff,0xff,0xff,0xc0,0x1,0xff,0xfe,0xff,0xfe,0x0,0x1f,0xff,0xff,0xff,0xff,0xe0,0x1,0xff,0xfe,0xff,0xfe,0x0,0x1f,0xff,0xff,0xff,0xff,0xe0,0x1,0xff,0xfe,0xff,0xff,0x0,0x1f,0xff,0xff,0xff,0xff,0xe0,0x1,0xff,0xfe,0xff,0xff,0x0,0x30,0x0,0xff,0xf0,0x0,0xf0,0x3,0xff,0xfe,0xff,0xff,0x80,0x40,0x3c,0xff,0xff,0xf8,0x30,0x3,0xff,0xfe,0xff,0xff,0x80,0x7,0xff,0xff,0xff,0xff,0x78,0x3,0xff,0xfe,0xff,0xff,0x80,0xff,0xff,0xff,0xfe,0x3f,0xf8,0x3,0xff,0xfe,0xff,0xff,0xc0,0xfc,0x1,0xff,0xf0,0x3,0xfc,0x7,0xff,0xfe,0xff,0xff,0xc1,0xf8,0x86,0xff,0xfe,0x3b,0xfc,0x7,0xff,0xfe,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xff,0xfc,0xf,0xff,0xfe,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xff,0xfe,0x3f,0xff,0xfe,0xff,0xff,0xe1,0xff,0xff,0xff,0xff,0xff,0xfe,0x3f,0xff,0xfe,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xfe,0x3f,0xff,0xfe,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xfe,0x7f,0xff,0xfe,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xfe,0x7f,0xff,0xfe,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xfe,0x87,0xbf,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xfc,0x1f,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xf8,0x3f,0xff,0xff,0xf8,0xbf,0xff,0xff,0xfe,0xff,0xff,0xff,0xf2,0xf,0xff,0xff,0xe3,0x3f,0xff,0xff,0xfe,0xff,0xff,0xff,0xf1,0xc0,0xff,0xfe,0x3f,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xf0,0xf0,0x0,0x1,0xff,0xbf,0xff,0xff,0xfe,0xff,0xff,0xff,0xf0,0x7f,0xff,0xff,0xff,0x5f,0xff,0xff,0xfe,0xff,0xff,0xff,0xf0,0x7f,0xff,0xff,0xff,0x5f,0xff,0xff,0xfe,0xff,0xff,0xff,0xf0,0x3f,0xff,0xff,0xff,0x1f,0xff,0xff,0xfe,0xff,0xff,0xff,0xf0,0x3f,0xff,0xff,0xff,0x1f,0xff,0xff,0xfe,0xff,0xff,0xff,0xf0,0x3f,0xff,0xff,0xfe,0x3f,0xff,0xff,0xfe,0x7f,0xff,0xff,0xfc,0x3f,0xff,0xff,0xfe,0x7f,0xff,0xff,0xfe,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xfe}, {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xf0,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x1f,0xff,0xff,0xff,0xff,0x80,0x7,0xfe,0x7f,0x0,0x1f,0xff,0xff,0xff,0xff,0x80,0x1f,0xff,0xff,0x80,0x1f,0xff,0xff,0xff,0xff,0x80,0x1f,0xff,0xff,0x98,0x1f,0xff,0xff,0xff,0xff,0x80,0x3f,0xff,0xff,0xdc,0x1f,0xff,0xff,0xff,0xff,0xc0,0x7f,0xff,0xff,0xce,0x1f,0xff,0xff,0xff,0xff,0xc0,0x7f,0xff,0xff,0xcf,0x1f,0xff,0xff,0xff,0xff,0xc0,0xff,0xff,0xff,0xcf,0x1f,0xff,0xff,0xff,0xff,0xc1,0xff,0xff,0xff,0xcf,0x9f,0xff,0xff,0xff,0xff,0xc1,0xff,0xff,0xff,0xff,0x83,0xff,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0x87,0x83,0xff,0xff,0xff,0xff,0xe3,0xff,0xff,0xfe,0x3,0xc3,0xff,0xff,0xff,0xff,0xe3,0xf8,0x1f,0xf8,0x3,0xc3,0xff,0xff,0xff,0xff,0xf3,0xf7,0x81,0xf8,0x77,0xc3,0xff,0xff,0xff,0xff,0xf3,0xff,0xf1,0xe0,0x0,0xc3,0xff,0xff,0xff,0xff,0xfb,0xfe,0x1,0xe0,0x0,0xe7,0xff,0xff,0xff,0xff,0xfb,0xf9,0x3,0xe3,0xf0,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0xe0,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf1,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf1,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x3e,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x18,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xf8,0x0,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xf0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xe0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xf0,0x0,0x7f,0xff,0xff,0xff,0xff,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xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xf0,0x0,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xe0,0x0,0x0}, {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe1,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x0,0x0,0xf,0xff,0xff,0xff,0xff,0xf0,0x0,0x0,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0xfe,0x0,0x0,0xff,0xff,0xff,0xff,0x80,0x0,0x3,0xff,0xff,0x0,0xff,0xff,0xff,0xff,0x80,0x0,0xff,0xff,0xff,0x80,0xff,0xff,0xff,0xff,0x80,0x3,0xff,0xff,0xff,0xc0,0xff,0xff,0xff,0xff,0x80,0x3,0xff,0xff,0xff,0xc0,0x7f,0xff,0xff,0xff,0x80,0x7,0xff,0xff,0xff,0xc0,0x7f,0xff,0xff,0xff,0x80,0xf,0xff,0xff,0xff,0xc0,0xff,0xff,0xff,0xff,0x0,0xf,0xff,0xff,0xff,0xc0,0xff,0xff,0xff,0xff,0x0,0xf,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xfe,0x0,0x3f,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xfe,0x0,0xf,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0x0,0x0,0x7f,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0x0,0x0,0x1f,0xe0,0x1,0xf1,0xff,0xff,0xff,0xff,0x0,0x0,0x7,0x83,0xe1,0xf3,0xff,0xff,0xff,0xff,0x0,0x0,0x3,0xc0,0x1f,0xf3,0xff,0xff,0xff,0xff,0x0,0x1,0x27,0xe0,0x47,0xf3,0xff,0xff,0xff,0xff,0x80,0xf,0xf7,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0x80,0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x7f,0x8f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x7f,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x3e,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x1e,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xe,0xf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xc,0x3,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x7,0xf8,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x0,0x0,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0xf,0xff,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0xff,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x0,0x7f,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xc0,0x7f,0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x7f,0xff,0x7,0xff,0xff,0xff,0xff,0xff,0xfe,0x0,0x3f,0xfe,0xf,0xff,0xff,0xff,0xff,0xff,0xf0,0x0,0x7,0xf0,0x1f,0xff,0xff,0xff,0xff,0xfe,0x0,0x0,0x0,0x0,0x3f,0xff,0xff,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0xff,0xff,0xff,0xff,0xfc,0x0,0x0,0x0,0x0,0x1,0xff,0xff,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x7,0xff,0xff,0xff,0xff,0xf8,0x0,0x0,0x0,0x0,0xf,0xff,0xff,0xff,0xff}, {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0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0x0,0xff,0xfc,0x0,0x0,0x7f,0xfe,0x0,0x0,0x0,0x0,0xff,0xf8,0x0,0x0,0x3f,0xff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3f,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0xff,0xff,0xc0,0x0,0x0,0x0} }; // 创建对象 DFRobot_Iot myIot; // 主程序开始 void setup() { mPython.begin(); myIot.setMqttCallback(msgHandles); myIot.wifiConnect("SRZX-WIFI", "20131209"); delay(myIot.wifiStatus() * 1000); display.fillScreen(1); display.setCursor(22, 22); display.print("连接成功"); delay(1000); myIot.init("iot.dfrobot.com.cn","BJm0d8awUG","","HkVCuIaDUM",topics,1883); myIot.connect(); display.fillScreen(1); } void loop() { } // 事件回调函数 void obloqMqttEventT0(String& message) { if ((message==String("NO1"))) { display.fillScreen(1); display.drawImage(15, 0, 95, 64, imageMatrix[0]); delay(2000); display.fillScreen(1); } if ((message==String("NO2"))) { display.fillScreen(1); display.drawImage(15, 0, 80, 64, imageMatrix[1]); delay(2000); display.fillScreen(1); } if ((message==String("NO3"))) { display.fillScreen(1); display.drawImage(15, 0, 80, 64, imageMatrix[2]); delay(2000); display.fillScreen(1); } if ((message==String("NO4"))) { display.fillScreen(1); display.drawImage(15, 0, 80, 64, imageMatrix[3]); delay(2000); display.fillScreen(1); } if ((message==String("X"))) { display.fillScreen(1); display.drawImage(15, 0, 80, 64, imageMatrix[4]); delay(2000); buzz.play(DADADADUM, Once); display.fillScreen(1); } } [/mw_shl_code] 防聚集程序 [mw_shl_code=cpp,false]/*! * MindPlus * uno * */ #include <UNO_Obloq.h> #include <SoftwareSerial.h> #include <DFRobot_SYN6288.h> #include <DFRobot_HuskyLens.h> // 静态常量 const String topics[5] = {"9POEJS_Zg","","","",""}; // 创建对象 UNO_Obloq olq; SoftwareSerial softSerial(2, 3); DFRobot_SYN6288 syn6288; DFRobot_HuskyLens huskylens; // 主程序开始 void setup() { softSerial.begin(9600); olq.startConnect(&softSerial, "SRZX-WIFI", "20131209", "BJm0d8awUG", "HkVCuIaDUM", topics, "iot.dfrobot.com.cn", 1883); syn6288.begin(&Serial, 0, 1, 4); syn6288.playText("系统初始化成功", 1); huskylens.beginI2CUntilSuccess(); huskylens.writeAlgorithm(ALGORITHM_FACE_RECOGNITION); } void loop() { huskylens.request(); if ((huskylens.readCount(HUSKYLENSResultBlock)>=3)) { olq.publish(olq.topic_0, "gather"); delay(3000); syn6288.playText("请不要聚集!!", 15); } }[/mw_shl_code] 5.设备组装 第1步:拿出激光切割好的结构件,及相关电子件器材。 第2步:取出前面板,安装非接触测温传感器和HuskyLens AI 视觉传感器固定位螺丝。 第3步:在上一步基础上安装非接触测温传感器和视觉识别传感器。 第4步:安装前面板背面的门锁。 第5步:拿出主控器及继电器安装在侧面板上。 第6步:将四个侧面板拼接与底板组合。 第7步:拿出另外一只HuskyLens AI 视觉传感器固定在顶板对应孔位上。 第8步:安装门及铰链。 7.测试与运行 分别使用四张照片作为测试的对象(因为此处可以用真正的人脸)但进入场馆后不好演示,所以使用了这种方式。 |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed