Easy IoT实现简单的MQTT实验
实验目的及要求
【实验一】Easy IoT配置
【实验二】实现Easy IoT上MQTT消息的通讯
实验原理与内容
实现mind+下Easy IoT上MQTT消息的通讯
实验软硬件环境
硬件:掌控板
软件:Mind+
实验过程
1.源码仓库地址:https://gitee.com/kwong-chi-ho/internet-of-things-course.git
2.核心代码截图:
/*!
* MindPlus
* mpython
*
*/
#include <MPython.h>
#include <DFRobot_Iot.h>
// 函数声明
void obloqMqttEventT0(String& message);
void obloqMqttEventT1(String& message);
// 静态常量
const String topics[5] = {
"JP4HuslGR","3bNHuy_Gg","","","&