Book Image

Developing IoT Projects with ESP32 - Second Edition

By : Vedat Ozan Oner
3 (2)
Book Image

Developing IoT Projects with ESP32 - Second Edition

3 (2)
By: Vedat Ozan Oner

Overview of this book

ESP32, a low-cost and energy-efficient system-on-a-chip microcontroller, has become the backbone of numerous WiFi devices, fueling IoT innovation. This book offers a holistic approach to building an IoT system from the ground up, ensuring secure data communication from sensors to cloud platforms, empowering you to create production-grade IoT solutions using the ESP32 SoC. Starting with IoT essentials supported by real-world use cases, this book takes you through the entire process of constructing an IoT device using ESP32. Each chapter introduces new dimensions to your IoT applications, covering sensor communication, the integration of prominent IoT libraries like LittleFS and LVGL, connectivity options via WiFi, security measures, cloud integration, and the visualization of real-time data using Grafana. Furthermore, a dedicated section explores AI/ML for embedded systems, guiding you through building and running ML applications with tinyML and ESP32-S3 to create state-of-the-art embedded products. This book adopts a hands-on approach, ensuring you can start building IoT solutions right from the beginning. Towards the end of the book, you'll tackle a full-scale Smart Home project, applying all the techniques you've learned in real-time. Embark on your journey to build secure, production-grade IoT systems with ESP32 today!
Table of Contents (15 chapters)
13
Other Books You May Enjoy
14
Index

Preface

It has been a long time since the first Internet of Things (IoT) devices entered our lives, and now they are helping us in many ways. We have smart TVs, voice assistants, connected appliances at home, or Industrial IoT (IIoT) devices being used in the transportation, healthcare, agriculture, and energy sectors – virtually everywhere. The new generation has been growing up with this technology and using IoT devices effectively (my 3-year-old daughter’s music box, for example, is an Echo device). Furthermore, new IoT products are introduced on the market every day with novel features or improved capabilities.

We all appreciate how fast technology is changing. It is hard for everybody to keep up with all those changes: technology manufacturers, technology consumers, and, in between them, people like us – IoT developers that make technology available to consumers. Since the 1st edition of this book, Espressif Systems has added many chips to their portfolio in response to market needs. For instance, we see the single-core ESP32-C family of System-on-Chip (SoC) devices with RISC-V architecture. They have a reduced set of capabilities and memory but are much cheaper compared to the first ESP32. There is also the ESP32-S family as a new branch of the original ESP32 SoCs with more capabilities and peripherals to support Artificial Intelligence-of-Things (AIoT) solutions. On top of hardware, we see state-of-the-art frameworks and libraries that enable us to use those SoCs in different types of applications. In this book, I’ve tried to cover them from a bit of a different perspective in addition to the basics of ESP32 development as a starting point.

There are several key differences between the first edition and this one. First of all, the examples of this edition are developed in C++ by employing ESP-IDF, compared to the C programming language and the PlatformIO environment in the first edition. We will also use different development kits from Espressif Systems in this edition, which makes hardware setup easier in some examples. In terms of content, we will discuss machine learning on ESP32 with hands-on projects, but the Bluetooth/BLE topics have been excluded from the book and some others have been condensed to make room for the machine learning examples. A noteworthy addition that I expect you would find interesting in this edition is the exploration of integration with third-party libraries. In the relevant chapter, various methods of incorporating third-party libraries into ESP32 projects will be discussed.

This doesn’t mean the 1st edition is now obsolete. On the contrary, it is still perfectly valid if you are new to IoT with ESP32. With this edition of the book, we have a chance to discuss the subjects where the 1st edition With this edition of the book, we have a chance to discuss in detail about the emerging new technology in terms of new technology. I really enjoyed preparing the examples for this book, and I hope you enjoy them, too. I want to share a wise quote from a distinguished historian and women’s rights activist, Mary Ritter Beard, before delving into the topics.

“Action without study is fatal. Study without action is futile.”

- Mary Ritter Beard