OneNET平臺遠(yuǎn)程溫濕度監(jiān)測系統(tǒng)實(shí)訓(xùn)報(bào)告
1.項(xiàng)目背景
在現(xiàn)代農(nóng)業(yè)當(dāng)中,為了確保能夠精確準(zhǔn)時(shí)的測量大棚產(chǎn)業(yè)的溫度濕度纬傲,所以利用物聯(lián)網(wǎng)技術(shù)建設(shè)遠(yuǎn)程溫濕度系統(tǒng)柱恤,能夠及時(shí)準(zhǔn)確的觀察溫濕度。
2.項(xiàng)目目標(biāo)
1.注冊O(shè)neNET平臺賬號和完成學(xué)生認(rèn)證
2.在OneNET平臺上添加自己的產(chǎn)品與設(shè)備
3.設(shè)備在線數(shù)據(jù)上報(bào)
4.通過串口查看實(shí)時(shí)數(shù)據(jù)
5.OneNET平臺查看溫濕度數(shù)據(jù)
3.實(shí)驗(yàn)步驟
1.OneNET平臺注冊和認(rèn)證
2.在OneNET上添加產(chǎn)品
3.添加設(shè)備
4.設(shè)備在線數(shù)據(jù)正常上報(bào)
5.關(guān)鍵代碼
更改自己的IMEI鹤啡、IMSI
const char endpoint_name[] = "211501083029506;1";
溫度資源
temp.type = NBIOT_FLOAT;
temp.flag = NBIOT_READABLE;
ret = nbiot_resource_add(dev,
3303, /* objId */
0, /* instId */
5700, /* resId */
&temp);
if (ret)
{
nbiot_device_destroy(dev);
printf("device add resource(temp) failed, code = %d.\r\n", ret);
}
濕度資源
humi.type = NBIOT_FLOAT;
humi.flag = NBIOT_READABLE;
ret = nbiot_resource_add(dev,
3304,
0,
5700,
&humi);
if (ret)
{
nbiot_device_destroy(dev);
printf("device add resource(humi) failed, code = %d.\r\n", ret);
}
6.OneNET平臺查看溫濕度數(shù)據(jù)
查看溫濕度數(shù)據(jù)
7.串口發(fā)送資源數(shù)據(jù)
1.[2021-03-23_14:24:42:624]H?send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.410000",1
2.[2021-03-23_14:24:46:738]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"22.410000",1
3.[2021-03-23_14:24:46:876]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"48.168739",1
4.[2021-03-23_14:24:46:879]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"48.168739",1
5.[2021-03-23_14:25:01:791]cmd:AT+NRB
6.[2021-03-23_14:25:11:797]cmd:AT+CIMI
7.[2021-03-23_14:25:14:238]cmd:AT+CMVER
8.[2021-03-23_14:25:20:287]cmd:AT+CMEE=1
9.[2021-03-23_14:25:22:709]cmd:AT+CSCON=1
10.[2021-03-23_14:25:25:131]cmd:AT+CEREG=2
11.[2021-03-23_14:25:27:553]cmd:AT+CEDRXS=0,5
12.[2021-03-23_14:25:31:180]cmd:AT+CPSMS=0
13.[2021-03-23_14:25:34:802]cmd:AT+CEREG?
14.[2021-03-23_14:25:38:456]cmd:AT+csq[2021-03-23_14:25:40:891]cmd:AT+MIPLCONF=57,000000002C0100001900636F61703A2F2F3138332E3233302E34302E34303A3536383311003231313530313038333032393530363B31050502,1,1
15.[2021-03-23_14:25:41:422]cmd:AT+MIPLADDOBJ=0,3303,0
16.[2021-03-23_14:25:41:817]send data:AT+MIPLNOTIFY=0,3303,0,5700,4,"1234",0
17.[2021-03-23_14:25:41:822]Data:AT+MIPLNOTIFY=0,3303,0,5700,4,"1234",0
18.[2021-03-23_14:25:41:998]cmd:AT+MIPLADDOBJ=0,3304,0
19.[2021-03-23_14:25:42:392]send data:AT+MIPLNOTIFY=0,3304,0,5700,4,"1234",0
20.[2021-03-23_14:25:42:397]Data:AT+MIPLNOTIFY=0,3304,0,5700,4,"1234",0
21.[2021-03-23_14:25:42:573]cmd:AT+MIPLOPEN=0,30
4.實(shí)訓(xùn)總結(jié)
這次的實(shí)訓(xùn)很有收獲,知道了平臺的使用蹲嚣,串口的調(diào)試递瑰,知道設(shè)備采集數(shù)據(jù)使如何上傳到平臺,學(xué)會了簡書如何編寫隙畜,唯一不足就是設(shè)備有許多使用不了抖部。