B站:https://space.bilibili.com/309103931
中移4G模块-ML302专栏:https://blog.csdn.net/qq_33259323/category_10453372.html
中移4G模块-ML302文集:https://www.bilibili.com/read/readlist/rl328642
1.中移4G模块-ML302-OpenCpu开发-(固件编译和烧录)
https://blog.csdn.net/qq_33259323/article/details/108586847
https://www.bilibili.com/read/cv7876504
2.中移4G模块-ML302-OpenCpu开发-(MQTT连接阿里云)
https://blog.csdn.net/qq_33259323/article/details/108638945
https://www.bilibili.com/read/cv7876527
2.1中移4G模块-ML302-OpenCpu开发-(MQTT连接阿里云-订阅主题)
https://blog.csdn.net/qq_33259323/article/details/108960540
https://www.bilibili.com/read/cv7879954
2.2中移4G模块-ML302-OpenCpu开发-(MQTT连接阿里云-接收和发送数据)
https://blog.csdn.net/qq_33259323/article/details/108964810
https://www.bilibili.com/read/cv7886836
2.3中移4G模块-ML302-OpenCpu开发-(MQTT连接阿里云-RRPC通讯)
https://blog.csdn.net/qq_33259323/article/details/108965071
https://www.bilibili.com/read/cv7888259
3.中移4G模块-ML302-OpenCpu开发-串口开发
https://blog.csdn.net/qq_33259323/article/details/108974888
https://www.bilibili.com/read/cv7888865
4.中移4G模块-ML302-OpenCpu开发-51单片机串口转I2C
https://blog.csdn.net/qq_33259323/article/details/109020642
https://www.bilibili.com/read/cv7922942
5.中移4G模块-ML302-OpenCpu开发-MCP23017输入/输出
https://blog.csdn.net/qq_33259323/article/details/109109136
https://www.bilibili.com/read/cv7969395
7.中移4G模块-ML302-OpenCpu开发-PCF8591测量电压
https://blog.csdn.net/qq_33259323/article/details/109109266
https://www.bilibili.com/read/cv7969365
8.中移4G模块-ML302-OpenCpu开发-GPIO
https://blog.csdn.net/qq_33259323/article/details/108960947
https://www.bilibili.com/read/cv7877192
9.中移4G模块-ML302-OpenCpu开发-ADC
https://blog.csdn.net/qq_33259323/article/details/109020864
https://www.bilibili.com/read/cv7922958
10.中移4G模块-ML302-OpenCpu开发-CJSON
https://blog.csdn.net/qq_33259323/article/details/109020898
https://www.bilibili.com/read/cv7923020
11.中移4G模块-ML302-OpenCpu开发-HTTP
https://blog.csdn.net/qq_33259323/article/details/109020904
https://www.bilibili.com/read/cv7923054
中移4G模块-ML302-OpenCpu开发-(MQTT连接阿里云)
阿里云的项目创建和设备注册(已经创建好的请看下一条)
打开https://iot.console.aliyun.com/product/createProduct创建产品
填入相关信息,请注意下面三个红框的区域。完成之后点击创建
打开https://iot.console.aliyun.com/devices点击添加设备
创建好产品之后需要记住以下几个东西,会在下面使用到
ML302连接阿里云MQTT
下面的百度云链接是ML302_OpenCPU_V2.1.0 OPENCPU开发固件,把他下载下来
https://pan.baidu.com/s/1pA9rmXlWuV1s25e1GVzF4g 提取码:yvjl
首先打开ML302_OpenCPUsrcdemoaliyunsrcwrapperswrapper.c文件,可以看到这四个变量,对应着上面刚才获取到的产品和设备密钥。
然后打开ML302_OpenCPUsrccm_main.c文件在cm_main_task函数里面调用下面的方法
因为函数里面默认带了几个参数,我们需要把他去掉,然后下面几个注释掉的可以根据需要改动
改完之后编译->烧录->重启->打开串口,看到类似如下的内容说明连接成功,连接失败的话会打印失败内容。
然后打开网页->进入设备详情,可以测试一下延迟