ESP32 - IoT

In this tutorial, we will learn:

What is IoT?

In simple words, the Internet of Things (IoT) is a network of physical things that connect to the Internet. The thing can be called the IoT device. The IoT devices send/receive data to/from the Internet. The IoT devices can also exchange data with each other via the Internet.

How to connect ESP32 to the Internet

One of the most important tasks when making an IoT device using ESP32 is to connect ESP32 to the Internet

There are many ways to connect ESP32 to the Internet:

  • ESP32 - Bluetooth or BLE (required a Bluetooth gateway)
  • ESP32 - ZigBee (required a ZigBee gateway)
  • ESP32 - Lora (required a Lora gateway)
  • ESP32 - GPRS/3G/4G/5G

Among these methods, WiFi and Ethernet are the most widely-used, popular, simple, and secure. Most of the smart home products are using WiFi. Many industrial IoT devices are using Ethernet.

For Bluetooth, we can use the smartphone as Bluetooth gateway. TrackR bravo - Bluetooth Tracking Device is an example. It uses the smartphone as Bluetooth gateway for "Crowd Locate".

ESP32 IoT Applications

Generally, In IoT application, ESP32 collects data from sensors/devices to send to the Internet and receive data from the Internet to control motors/actuators. In detail, The IoT application can be categorized into the following types:

  • Controlling ESP32 via smartphone/PC
  • Monitoring ESP32 via smartphone/PC
  • ESP32 collects sensor's data and send to the database
  • ESP32 collects sensor's data and send to IoT Cloud
  • ESP32 detects the event and send notification via Email, SMS, Phone Call, push notification
  • ESP32 interacts with smart speakers like Amazon Echo Dot, Google Home ...
  • ESP32 interacts automatically with other devices using some protocol such as Modbus TCP.
  • ESP32 works as a gateway, which is a bridge between other devices and the Internet

Making simple IoT devices using ESP32

Let's make two IoT devices that connect to each other via the Internet, and a button/switch connected to ESP32 #1 controls an LED connected to ESP32 #2.

ESP32 IoT device

The source code, wiring diagram, and instruction is available in this tutorial

※ NOTE THAT:

Note that this tutorial is incomplete. We will post on our Facebook Page when the tutorial is complete. Like it to get updated.

※ NOTICES

  • We are AVAILABLE for HIRE. See how to hire us to do your project
  • If this tutorial is useful for you, please support us to make more tutorials.
  • We spent a lot of time and effort to create the content for this tutorial, please respect our work! Please do not copy the content to share on other websites. Howerver, please feel free to share the link of this tutorial anywhere