Connecting Sensors and Actuators with ESP32
In this chapter, we will dive into the world of sensors and actuators with the ESP32, a highly versatile and powerful microcontroller. By exploring its built-in features and connectivity options, you will develop a fundamental understanding of how to interact with the physical world using advanced pieces of hardware.
We will start with the introduction to the ESP32’s general purpose input/output (GPIO) pins and their functionality. Next, we will learn about universal asynchronous receiver-transmitters (UART) and serial communication, which will enable us to exchange data between devices. After mastering UART, we will turn our attention to the serial peripheral interface (SPI) communication protocol, a method commonly used to send data between microcontrollers and small peripherals. Finally, we will delve into I2C communication, a highly efficient two-wire protocol used for short-distance data transmission.
To truly understand...