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)

Working with a sound buzzer

In this section, we'll work with sound. Most games usually use music to provide sound background. For a simple sound device, we can use sound buzzer devices. We can use a PC-mountable mini-speaker - PC Mount (12mm, 2.048kHz) from SparkFun, found at the following link: You can see this in Figure 3-9, and you can also find some other sound buzzer models with low prices at AliExpress:

Figure 3-9: Mini Speaker - PC Mount

Next, we connect the sound buzzer to the ESP32 board.

Connecting the sound buzzer with the ESP32

A sound buzzer has two pins. One pin is connected to the GPIO and the other is connected to the GND. We connect a sound buzzer to the ESP32...