Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Developing IoT Projects with ESP32 - Second Edition
Developing IoT Projects with ESP32 - Second Edition

Developing IoT Projects with ESP32: Unlock the full Potential of ESP32 in IoT development to create production-grade smart devices, Second Edition

By Vedat Ozan Oner
$39.99 $27.98
Book Nov 2023 578 pages 2nd Edition
eBook
$39.99 $27.98
Print
$49.99
Subscription
$15.99 Monthly
eBook
$39.99 $27.98
Print
$49.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Nov 30, 2023
Length 578 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781803237688
Vendor :
Espressif Systems
Category :
Table of content icon View table of contents Preview book icon Preview Book

Developing IoT Projects with ESP32 - Second Edition

Developing IoT Projects with ESP32, Second Edition: Discover the IoT development ecosystem with ESP32 to create production-grade smart devices

Welcome to Packt Early Access. We’re giving you an exclusive preview of this book before it goes on sale. It can take many months to write a book, but our authors have cutting-edge information to share with you today. Early Access gives you an insight into the latest developments by making chapter drafts available. The chapters may be a little rough around the edges right now, but our authors will update them over time.

You can dip in and out of this book or follow along from start to finish; Early Access is designed to be flexible. We hope you enjoy getting to know more about the process of writing a Packt book.

  1. Chapter 1: Overview of ESP32 / Introduction to IoT development and the ESP32 platform
  2. Chapter 2: Understanding the development tools to create the first application
  3. Chapter 3: Using ESP32 peripherals...

Technical requirements

In this book, we are going to go through many practical examples where we can learn how to use ESP32 effectively in real-world scenarios. Although links to the examples are provided within each chapter, you can take a sneak peek at the online repository here: https://github.com/PacktPublishing/Developing-IoT-Projects-with-ESP32-2nd-edition. The examples are placed in their relative directories of the chapters for easy browsing. There is also a common source code directory that contains the shared libraries across the chapters.

The programming language of the examples is usually C++11 (the default C++ standard supported by the toolchain). However, there are several chapters where Python 3 is required to support the subject.

The hardware tools, development kits, and sensors that you will need throughout the book are the following:

  • ESP32-S3-BOX-Lite (approx. $35)
  • ESP32-C3-DevKitM-1 (approx. $8)
  • BME280 temperature, humidity, pressure...

Understanding the basic structure of IoT solutions

Although the definition of IoT might change slightly from different viewpoints, there are some key concepts in the IoT world that differentiate it from other types of technologies:

  • Connectivity: An IoT device is connected either to the internet or to a local network. An old-style thermostat on the wall waiting for manual operation with basic programming features doesn’t count as an IoT device.
  • Identification: An IoT device is uniquely identified in the network so that data has a context identified by that device. In addition, the device itself is available for remote update, remote management, and diagnostics.
  • Autonomous operation: IoT systems are designed for minimal or no human intervention. Each device collects data from the environment where it is installed, and it can then communicate the data with other devices to detect the current status of the system and respond as configured. This response can...

The ESP32 product family

Since the launch of the first ESP32 chip, Espressif Systems has extended the family with new designs for different purposes. They now have more than 200 different SoCs and modules in the inventory. Although it is impossible to discuss each of them one by one, we can talk about the ESP32 product family in general to understand their intended use cases. It is always a good idea to check what we need and what is available in the arsenal before starting a new IoT project.

There is an online tool on the Espressif website to find an SoC/module by filtering them based on selected features. You check the filter boxes, and the tool lists the hardware matching your requirements: https://products.espressif.com/#/product-selector

The following is a basic checklist for selecting an SoC/module:

  • Performance requirements (core frequency, single/double core)
  • Memory requirements (RAM, ROM)
  • Embedded flash requirements
  • Power requirements...

Development platforms and frameworks

ESP32 is quite popular. Therefore, there are a good number of options that you can select as your development platform and framework.

The first framework, of course, comes directly from Espressif itself. They call it the Espressif IoT Development Framework (ESP-IDF). It supports all three main OS environments – Windows, macOS, and Linux. After installing some prerequisite packages, you can download the ESP-IDF from the GitHub repository and install it on your development PC. They have collected all the necessary functionality into a single Python script, named idf.py, for developers. You can configure project parameters and generate a final binary image by using this command-line tool.

You can also use it in every step of your project, starting from the build phase to connecting and monitoring your ESP32 board from the serial port of your computer. If you are a more graphical UI person, then you need to install Visual Studio Code...

RTOS options

Basically, a real-time operating system (RTOS) provides a deterministic task scheduler. Although the scheduling rules change depending on the scheduling algorithm, we know that the task we create will complete in a certain time frame within those rules. The main advantages of using an RTOS are the reduction in complexity and improved software architecture for easier maintenance.

The main real-time operating system supported by ESP-IDF is FreeRTOS. ESP-IDF uses its own version of the Xtensa port of FreeRTOS. The fundamental difference compared with vanilla FreeRTOS is the dual-core support. In ESP-IDF FreeRTOS, you can choose one of two cores to assign a task, or you can let FreeRTOS choose it. Other differences compared with the original FreeRTOS mostly stem from the dual-core support. FreeRTOS is distributed under the MIT license. You can find the ESP-IDF FreeRTOS documentation at this URL: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference...

Summary

In this first chapter, we discussed what the Internet of Things (IoT) is in general and its building blocks to understand the basic structure of IoT solutions. One of the building blocks is device hardware that interacts with the physical world. System-on-chip (SoC) is a major component while designing an IoT device. Espressif Systems empowers us, as IoT developers, with its ESP32 product family, which includes many SoCs with different configurations in response to the needs of IoT projects. In addition to hardware, Espressif maintains the Espressif IoT Development Framework (ESP-IDF), the main software framework to develop IoT applications on ESP32 SoCs. ESP-IDF comes with all the necessary tools to deliver full-fledged IoT products. We also talked about real-time operating system (RTOS) options that we can select from in ESP32 development. ESP-IDF integrates FreeRTOS, a prominent RTOS option in the embedded world, as a component.

Following the background information...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Build IoT projects from scratch using ESP32
  • Customize solutions, take them to cloud, visualize real-time data, implement security features
  • Practice using a variety of hands-on projects such as an audio player, smart home, and more

Description

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!

What you will learn

Explore ESP32 with IDE and debugging tools for effective IoT creation Drive GPIO, I2C, multimedia, and storage for seamless integration of external devices Utilize handy IoT libraries to enhance your ESP32 projects Manage WiFi like a pro with STA & AP modes, provisioning, and ESP Rainmaker framework features Ensure robust IoT security with secure boot and OTA firmware updates Harness AWS IoT for data handling and achieve stunning visualization using Grafana Enhance your projects with voice capabilities using ESP AFE and Speech Recognition Innovate with tinyML on ESP32-S3 and the Edge Impulse platform

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Nov 30, 2023
Length 578 pages
Edition : 2nd Edition
Language : English
ISBN-13 : 9781803237688
Vendor :
Espressif Systems
Category :

Table of Contents

15 Chapters
Preface Chevron down icon Chevron up icon
Introduction to IoT development and the ESP32 platform Chevron down icon Chevron up icon
Understanding the Development Tools Chevron down icon Chevron up icon
Using ESP32 Peripherals Chevron down icon Chevron up icon
Employing Third-Party Libraries in ESP32 Projects Chevron down icon Chevron up icon
Project – Audio Player Chevron down icon Chevron up icon
Using Wi-Fi Communication for Connectivity Chevron down icon Chevron up icon
ESP32 Security Features for Production-Grade Devices Chevron down icon Chevron up icon
Connecting to Cloud Platforms and Using Services Chevron down icon Chevron up icon
Project – Smart Home Chevron down icon Chevron up icon
Machine Learning with ESP32 Chevron down icon Chevron up icon
Developing on Edge Impulse Chevron down icon Chevron up icon
Project – Baby Monitor Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(1 Ratings)
5 star 0%
4 star 100%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


N/A Feb 6, 2024
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Currently I am reading the book and trying the examples. The example I am busy with, does not compile. I am using the Espressif IDE and not Visual Studio + PlatformIO, but that should not cause the compile errors.
Feefo Verified review Feefo image
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.