An Introduction to the Internet of Things
Figure 1
Computers connected to form a network
Figure 2
When two networks are connected they form an
internet. These networks can connect to the worldwide internet known as
The Internet.
Figure 3
![The original and most basic Arduino - the Arduino Uno](../fig/Arduino_Uno_-_R3.jpg)
The original and most basic Arduino - the
Arduino Uno
Figure 4
![A WiFi shield for the Arduino Uno](../fig/WiFi_Shield_for_Arduino.jpg)
A WiFi shield for the Arduino Uno
Figure 5
![An ESP32 WROOM 32](../fig/ESP32.jpg)
An ESP32 WROOM 32
The Arduino IDE
Figure 1
![Arduino Splash Window](../fig/ArduinoIDE_startup.png)
Arduino Splash Window
Figure 2
![Arduino IDE](../fig/ArduinoIDE.png)
Arduino IDE
Figure 3
![Preferences Window](../fig/preferences.png)
Preferences Window
Figure 4
![Enter additional boards manager URLs](../fig/addURL.png)
Enter additional boards manager URLs
Figure 5
![Boards Manager](../fig/boardsManager.png)
Boards Manager
Figure 6
![Select esp32 and Install](../fig/esp32boards.png)
Select esp32 and Install
Figure 7
![USB connectors](../fig/USBConnectors.png)
USB connectors
Figure 8
![Click the compile and run button](../fig/compileCode.png)
Click the
compile and run
buttonFigure 9
![Code compiled and uploaded](../fig/uploaded.png)
Code compiled and uploaded
Figure 10
![Serial Monitor](../fig/monitor.png)
Serial Monitor
Understanding the code
Connecting the first sensor
Figure 1
![Temperature Sensor module (DHT22)](../fig/DHT22.png)
Temperature Sensor module (DHT22)
Figure 2
Wiring the DHT11 Temperature Sensor when it is
not part of a module
Figure 3
![Library Manager](../fig/librarymanager.png)
Library Manager
Connecting the second sensor
Figure 1
![Light Level with a Light Dependent Resistor (LDR)](../fig/LDR.png)
Light Level with a Light Dependent Resistor
(LDR)
Combining the two circuits
Figure 1
![Circuit with the DHT22 temperature sensor and and LDR light for measuring light intensity](../fig/DHT22_LDR.png)
Circuit with the DHT22 temperature sensor and
and LDR light for measuring light intensity
Using MQTT for the Internet of Things
Figure 1
![MQTT Architecture](../fig/mqtt_architecture.png)
MQTT Architecture
Figure 2
![Installing the PubSubClient library for MQTT messaging](../fig/PubSubClient.png)
Installing the PubSubClient library for MQTT
messaging
Figure 3
![An MQTT broker on the Internet](../fig/mqtt_internet.png)
An MQTT broker on the Internet
Figure 4
![An MQTT broker on a private network](../fig/mqtt_local_network.png)
An MQTT broker on a private network
Subscribing to an MQTT topic
Figure 1
![Running MQTTX](../fig/mqttx.png)
Running MQTTX
Figure 2
![New connection in MQTTX](../fig/new_connection.png)
New connection in MQTTX
Figure 3
![MQTTX connected to broker](../fig/connected.png)
MQTTX connected to broker
Figure 4
![New Subscription](../fig/new_subscription.png)
New Subscription
Figure 5
![Subscribed](../fig/subscribed.png)
Subscribed