[RVB2601 Creative Application Development] TCP Transmission of Temperature and Humidity
[Copy link]
The previous article introduced the use of OLED plus LVGL to display real-time data of temperature and humidity. This time we use the W800WiFi module above for wireless transmission and view it on the computer. The current W800 is actually a RISC-V-based chip, and we can also perform secondary development on it on the board. There are reserved interfaces on the board.
Look at the schematic diagram:
Its interface is also very rich. It can also directly burn the SDK we developed. You only need to connect the JATG line. Currently, our main chip is connected to it through the SPI interface.
The board is still like this. The WiFi module is on the back, so it is not visible from the front.
I also referred to many people’s tutorials for the program. I continued to add applications in it, this time it was a wifi task.
The main task is to initialize and send WiFi. At the same time, we splice the data to be sent.
This is the initialization, you can set the WiFi name and password. Then in the connected event, control the TCP connection.
As above, we can find the IP address of the computer, and then select a port to send data. Here I set the port to 1111. Any port should be fine. The effect is as follows:
We need to set up monitoring before connecting, and then wait for the connection of the lower computer. After connecting, a connection object will appear, and the lower computer will report data by itself. At the same time, if we create an acceptance task, we can also receive data.
With the wireless module, we can receive data from the board differently, and we can also remotely control the board.
|