Book Image

Internet of Things Projects with ESP32

By : Agus Kurniawan
Book Image

Internet of Things Projects with ESP32

By: Agus Kurniawan

Overview of this book

ESP32 is a low-cost MCU with integrated Wi-Fi and BLE. Various modules and development boards-based on ESP32 are available for building IoT applications easily. Wi-Fi and BLE are a common network stack in the Internet of Things application. These network modules can leverage your business and projects needs for cost-effective benefits. This book will serve as a fundamental guide for developing an ESP32 program. We will start with GPIO programming involving some sensor devices. Then we will study ESP32 development by building a number of IoT projects, such as weather stations, sensor loggers, smart homes, Wi-Fi cams and Wi-Fi wardriving. Lastly, we will enable ESP32 boards to execute interactions with mobile applications and cloud servers such as AWS. By the end of this book, you will be up and running with various IoT project-based ESP32 chip.
Table of Contents (12 chapters)

Handling a massive data request for a weather station

An ESP32 board has limited resources. We can push an ESP32 board to handle massive requests from clients. To serve large requests from clients, we can use a production web server. A production web server will make a request from the ESP32 board, and then broadcast to all the requesters or clients.

We can draw our general design for the ESP32 board to address massive requests in Figure 6.5. We can use Node.js as the web server to serve requests from clients. We also use Socket.io to broadcast messages to all requesters. Socket.io uses WebSocket technology to enable us to work with a full-duplex TCP connection on a browser.

You can learn about Socket.io at https://socket.io/:

Figure 6.5: Applying the Node.js server as a backend system

In this section, we'll develop a program with Node.js and Socket.io to serve all requests...