|
META TOPICPARENT |
name="Exercises" |
Connecting to WiFi
Exercise 1: |
|
Exercise 6 : |
|
> > |
- Move the server to the ESP32. In this case, the WiFi initialization is needed before starting the server part. Test the communication as you did in exercise 5.
- Move the client to the ESP32 and run the server on the PC.
Exercise 7 : |
| |
|
< < | Move the server to the ESP32. In this case, the WiFi initialization is needed before starting the server part. Test the communication as you did in exercise 5. |
> > | Write a client on the ESP32 which reads the temperature and humidity from the DHT11 every 5s and packs the result into a message of the following form: temperature [°C]: 25,humidity [%]: 56 Send this message to a server on the PC
The server parses the message and extracts the parameter names (temperature [°C] and humidity [%]) and the values and plots them in a dynamic plot created with matplotlib. The parameter names are used for the legend, the values are displayed graphically.
In the above plot, I put a finger on the DHT11, which quickly increases the measured humidity and more slowly increases the temperature. |
|
-- Uli Raich - 2022-08-29 |
|
META FILEATTACHMENT |
attachment="solution_ex2.png" attr="" comment="" date="1662234773" name="solution_ex2.png" path="solution_ex2.png" size="72697" user="UliRaich" version="2" |
META FILEATTACHMENT |
attachment="wifi_connect.py.png" attr="" comment="" date="1661761728" name="wifi_connect.py.png" path="wifi_connect.py.png" size="21352" user="UliRaich" version="1" |
META FILEATTACHMENT |
attachment="client-server.png" attr="" comment="" date="1662279423" name="client-server.png" path="client-server.png" size="203943" user="UliRaich" version="1" |
|
|
> > |
META FILEATTACHMENT |
attachment="dht11Plot.png" attr="" comment="" date="1664094975" name="dht11Plot.png" path="dht11Plot.png" size="32021" user="UliRaich" version="1" |
|