Developing IoT Projects with ESP32
eBook - ePub

Developing IoT Projects with ESP32

Vedat Ozan Oner

Share book
  1. 470 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Developing IoT Projects with ESP32

Vedat Ozan Oner

Book details
Book preview
Table of contents
Citations

About This Book

Master the technique of using ESP32 as an edge device in any IoT application where wireless communication can make life easier

Key Features

  • Gain practical experience in working with ESP32
  • Learn to interface various electronic devices such as sensors, integrated circuits (ICs), and displays
  • Apply your knowledge to build real-world automation projects

Book Description

Developing IoT Projects with ESP32 provides end-to-end coverage of secure data communication techniques from sensors to cloud platforms that will help you to develop production-grade IoT solutions by using the ESP32 SoC. You'll learn how to employ ESP32 in your IoT projects by interfacing with different sensors and actuators using different types of serial protocols.This book will show you how some projects require immediate output for end-users, and cover different display technologies as well as examples of driving different types of displays. The book features a dedicated chapter on cybersecurity packed with hands-on examples. As you progress, you'll get to grips with BLE technologies and BLE mesh networking and work on a complete smart home project where all nodes communicate over a BLE mesh. Later chapters will show you how IoT requires cloud connectivity most of the time and remote access to smart devices. You'll also see how cloud platforms and third-party integrations enable endless possibilities for your end-users, such as insights with big data analytics and predictive maintenance to minimize costs.By the end of this book, you'll have developed the skills you need to start using ESP32 in your next wireless IoT project and meet the project's requirements by building effective, efficient, and secure solutions.

What you will learn

  • Explore advanced use cases like UART communication, sound and camera features, low-energy scenarios, and scheduling with an RTOS
  • Add different types of displays in your projects where immediate output to users is required
  • Connect to Wi-Fi and Bluetooth for local network communication
  • Connect cloud platforms through different IoT messaging protocols
  • Integrate ESP32 with third-party services such as voice assistants and IFTTT
  • Discover best practices for implementing IoT security features in a production-grade solution

Who this book is for

If you are an embedded software developer, an IoT software architect or developer, a technologist, or anyone who wants to learn how to use ESP32 and its applications, this book is for you. A basic understanding of embedded systems, programming, networking, and cloud computing concepts is necessary to get started with the book.

]]>

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Developing IoT Projects with ESP32 an online PDF/ePUB?
Yes, you can access Developing IoT Projects with ESP32 by Vedat Ozan Oner in PDF and/or ePUB format, as well as other popular books in Informatique & Réseaux informatiques. We have over one million books available in our catalogue for you to explore.

Information

Year
2021
ISBN
9781838642808

Section 1: Using ESP32

In this section, you will learn about the development platform/framework options for starting with ESP32 and how to use ESP32 in a project by interfacing with different sensors and actuators.
This part of the book comprises the following chapters:
  • Chapter 1, Getting Started with ESP32
  • Chapter 2, Talking to the Earth – Sensors and Actuators
  • Chapter 3, Impressive Outputs with Displays
  • Chapter 4, A Deep Dive into the Advanced Features
  • Chapter 5, Practice – Multisensor for Your Room

Chapter 1: Getting Started with ESP32

Espressif ESP32 is a powerful tool in the toolbox of a developer for many types of Internet of Things (IoT) projects. We are all developers, and we all know how important it is to select the right tool for a given problem in a domain. To solve the problem, we need to understand the domain, and we need to know the available tools and their features that are important for that specific problem in order to find the right one (or perhaps several combined). After selecting the tool, we eventually need to figure out how to use it in the most efficient and effective way possible so as to maximize the added value for end users.
In this chapter, I will discuss the technology, IoT, in general, what an IoT solution looks like in terms of basic architecture, and how ESP32 fits into those solutions as a tool. If you are new to IoT technology, or are thinking of using ESP32 in your next project, this chapter helps you to understand the big picture from the technology perspective by describing what ESP32 provides, its capabilities, and its limitations.
The main topics covered in this chapter are as follows:
  • IoT as an emerging technology and its application areas with some examples
  • The basic structure of IoT solutions, including security considerations
  • An introduction to the ESP32 platform and modules
  • Available development platforms and frameworks
  • Real-Time Operating System (RTOS) options for ESP32

Technical requirements

In this book, we are going to have 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/Internet-of-Things-with-ESP32. 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.
We will use different software tools and hardware components throughout the book. Each chapter shows its own list of these tools and components.

IoT as an emerging technology

When I started my career 20 years ago, my first project involved collecting data regarding radio and TV stations by measuring some Radio Frequency (RF) parameters of broadcasted channels. The task was to design and develop a system in order to understand whether the stations comply with the existing regulations in the country. As a solution for this engineering problem, the technical leaders in the team designed a van with various equipment, including the following:
  • A spectrum analyzer
  • A TV demodulator
  • Different types of antennas to measure those parameters
  • An industrial PC to run the application software
  • A radio transmitter to upload the measurements and some basic analysis to a data center
I was lucky that I participated in such a project in my very first job and saw how a complete data acquisition system was designed and developed to solve a real-world problem. This project was in the year just after Kevin Ashton introduced the term Internet of Things to technology literature in 1999.
When I first heard this term and was trying to understand what it actually means, I quickly noticed the similarities between an IoT solution and our monitoring van. We collected data from the environment by using some sensing devices, we had a processing unit, and we also transferred information to a central data storage and processing center. This last part was to access more processing and spot correlation between data coming from multiple vans. So, why not call it an IoT product? Well, not exactly. From that perspective, you could easily call any SCADA or PLC product an IoT system as well, so IoT would only then constitute a rebranding of existing technologies.

What is IoT?

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 be in the form of an action, a log, or an alert if required.
  • Interoperability: Devices in an IoT solution talk to one another, but they don't necessarily belong to a single vendor. When devices designed by different vendors share a common application-level protocol, adding a new device to that heterogeneous network is as easy as clicking on a few buttons on the device or on the management software.
  • Scalability: IoT systems are capable of horizontal scalability to respond to an increasing workload. A new device is added when necessary to increase capacity instead of replacing the existing one with a superior device (vertical scalability).
  • Security: I wish I could say that every IoT solution implements at least the minimal set of mandatory security measures, but unfortunately, this is not the case, despite a number of bad experiences, including the infamous Mirai botnet attack. On a positive note, I can say that IoT devices mostly have secure boot, secure update, and secure communication features to ensure confidentiality, integrity, and availability the (CIA triad).
Gartner added IoT in the 2011 hype cycle, with the expectation of more than 10 years to mainstream adoption. However, many related technologies, such as RFID, mesh networking, and Bluetooth, were already on the list many years before 2011, along with enablers such as mobile and cloud technologies. Since then, Gartner has added several other IoT technologies and applications to its list, including the following:
  • IoT platform
  • Connected home
  • Smart dust
  • Edge computing
  • Low-cost, single-board computers at the edge
5G and embedded AI are other revolutionary technologies on the Gartner list that support IoT and expand its area of application.

Where do we apply IoT?

The application areas are vast, but conceptually speaking, we can group them into two basic categories:
  • In the consumer IoT category, we can see mainly smart home and security systems, personal healthcare products, wearable technologies, and asset tracking applications.
  • The industrial IoT category has more application areas, as you might expect. Every year, IoT Analytics publishes a top-10 trend list for industrial applications by reviewing thousands of new projects and the 2020 list contains manufacturing, transportation, energy, retail, cities, healthcare, supply chain, agriculture, and building applications in that order (https://iot-analytics.com/top-10-iot-applications-in-2020).
Since we have limited space in this book, I don't want to waste pages talking about each of these application areas. Instead, I'd like to share more interesting cases to show how the IoT technology can provide powerful solutions when incorporated with other cutting-edge technologies.

AI/ML on the edge

AI has been around for a long time and there are many successful examples...

Table of contents