amc2020:group_n:wifi
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
amc2020:group_n:wifi [2020/07/29 10:46] – [3.3 Results] jonas001 | amc2020:group_n:wifi [2023/01/05 14:38] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | < | ||
+ | < | ||
+ | <a href=" | ||
+ | <span style=" | ||
+ | ↩ Back to the main page | ||
+ | </ | ||
+ | </a> | ||
+ | </ | ||
+ | </ | ||
+ | |||
====== ESP32 Connection to WiFi and MQTT ====== | ====== ESP32 Connection to WiFi and MQTT ====== | ||
===== 1. About MQTT ===== | ===== 1. About MQTT ===== | ||
- | MQTT stands for Message Queuing Telemetry Transport and is publish-subscribe network protocol for transporting messages between different devices. It was first developed in 1999 and is very popular for IoT (Internet of Things) applications. | + | MQTT stands for Message Queuing Telemetry Transport and is a publish-subscribe network protocol for transporting messages between different devices. It was first developed in 1999 and is very popular for IoT (Internet of Things) applications. |
The core of an MQTT network is a server also called MQTT broker. Other devices, called clients, can connect through WiFi to the broker and publish or subscribe to certain topics. The broker receives the messages that are published by the clients and sorts them by their topics. Clients can also subscribe to topics; if a new message is published under a certain topic, the broker redirects this message to all clients that are subscribed to that topic. | The core of an MQTT network is a server also called MQTT broker. Other devices, called clients, can connect through WiFi to the broker and publish or subscribe to certain topics. The broker receives the messages that are published by the clients and sorts them by their topics. Clients can also subscribe to topics; if a new message is published under a certain topic, the broker redirects this message to all clients that are subscribed to that topic. | ||
Line 166: | Line 176: | ||
Timer= millis()+1000; | Timer= millis()+1000; | ||
Serial.print(" | Serial.print(" | ||
+ | mqttClient.connect(" | ||
} | } | ||
| | ||
Line 200: | Line 211: | ||
</li> | </li> | ||
<li> | <li> | ||
- | | + | |
</li> | </li> | ||
<li> | <li> | ||
Line 287: | Line 298: | ||
</li> | </li> | ||
<li> | <li> | ||
- | The function < | + | The function < |
</li> | </li> | ||
<li> | <li> | ||
Line 311: | Line 322: | ||
^{{: | ^{{: | ||
- | |**//Figure 4//** Transmission of sensor data of DHT-22 and DS18B20 using MQTT.| | + | |**//Figure 4//** Transmission of sensor data of DHT-22 and DS18B20 using MQTT. The left side shows the published measurement values in MQTT.fx; the right side shows the same results in the Arduino IDE's serial monitor.| |
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <a href=" | ||
+ | <span style=" | ||
+ | Back to the top &# | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ |
amc2020/group_n/wifi.1596012410.txt.gz · Last modified: 2023/01/05 14:38 (external edit)