Using ESP32 Peripherals
In the previous chapter, we discussed the available tools that we can use to develop applications on ESP32. We learned about ESP-IDF, the PlatformIO IDE, and debugging and testing applications. Now, it is time to use the ESP32 peripherals in applications. Peripherals are how MCUs connect to the outer world. The ESP32 series chips provide a wide range of peripherals. Depending on the product vision, each family may have different types of peripherals and different numbers of channels of peripherals. For example, the ESP32-S2/S3 series has more GPIO pins compared to other families and features USB OTG (On-the-Go) to act as a USB host, which allows us to connect other USB devices, such as a keyboard or mouse. On the other hand, the ESP32-C family has a reduced set of peripherals to achieve much lower costs.
In this chapter, we will learn how to use some popular peripherals of ESP32 in the example applications. The topics are:
- Driving General-Purpose...