1249 views|2 replies

407

Posts

7

Resources
The OP
 

【Distributed temperature and humidity acquisition system】+temperature and humidity acquisition module [Copy link]

 This post was last edited by lansebuluo on 2022-9-22 09:12

After a period of getting familiar with the W800 chip configuration and demo code, I finally completed the programming and debugging of the temperature and humidity acquisition module. Now I list the functions and uses of the module below, organize the code, and then publish the source code.

The program control block diagram is as follows

Instructions

1> Click the BOOT button of the temperature and humidity collection circuit board W800WFI module to start the web configuration wifi connection network.

2> Connect the laptop to the network "softap_xxxx", enter the URL 192.168.1.1 in the web browser, open the web page, as shown below, select the network scanned by the temperature and humidity acquisition circuit board, then enter the corresponding password, and then save to complete the network configuration. The network configuration is saved in the circuit board. The next time you power on, you can directly connect to the network.

If the network configuration is successful, the following information will be displayed in the print panel:

after int io =1

AP Mode web server config mode

[WEB]SSID:xxxxxxxx

[WEB]PASSWORD:xxxxxxxx

NETIF_WIFI_JOIN_SUCCESS

sta ip: 192.168.11.221

ip: 192.168.11.221

oneshot net up, time:331170

step1: init mqtt lib.

step2: establishing TCP connection.

step3: establishing mqtt connection.

step4: subscribe mqtt

step5: start the Heart-beat preservation timer

3> After the network configuration is successful, the MQTT server will be connected and the topic to be received will be subscribed.

4> Start the data reading operation of the temperature and humidity sensor SHT20.

5> The xxxx/mqtt_rx_demo topic is published through the MQTT protocol at an interval of 1 second, and the following information is printed in the print window.

pushed: xxxx/mqtt_rx_demo <<< T=29.0,H=36.5

The data content sent by the module can be monitored through the MQTTBox software.

6> Set alarm, publish the topic "xxxx/mqtt_tx_demo", the information content is "mmmm-Tmax=xx.x,Tmin=xx.x,Hmax=xx.x,Hmin=xx.x,a,b,c,d", where mmmm is the module name (the last two digits of the WIFI MAC address), Tmax=xx.x is the set temperature upper limit, Tmin=xx.x is the set temperature lower limit, Hmax=xx.x is the set humidity upper limit, Hmin=xx.x is the set humidity lower limit, a is 1 for Tmax alarm enable, b is 1 for Tmin alarm enable, c is 1 for Hmax alarm enable, d is 1 for Hmin alarm enable. The set information is also saved in the circuit board.

Alarm settings can be sent through MQTTBox software.

This post is from DigiKey Technology Zone

Latest reply

The program control block diagram is very clear   Details Published on 2022-9-22 07:19
 
 

6548

Posts

0

Resources
2
 

The program control block diagram is very clear

This post is from DigiKey Technology Zone

Comments

It is simple to write, but the actual program is quite complicated  Details Published on 2022-9-22 09:13
 
 
 

407

Posts

7

Resources
3
 
Jacktang posted on 2022-9-22 07:19 The program control block diagram is very clear

It is simple to write, but the actual program is quite complicated

This post is from DigiKey Technology Zone
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list