In this recipe, we are going to use the Arduino framework to program a bare-metal IoT solution. On your PC, you will need to install the Arduino integrated development environment (IDE). This will install the supporting software so that we can program the ESP32 using the Arduino framework. Next, we will install Visual Studio Code (VS Code). The VS Code IDE has an extension that makes board selection and library add-in easy. It also has a serial monitor and several built-in tools.
Once you have installed the Arduino IDE and VS Code, you need to find the required extension tool in VS Code. Then search for platformIO, as shown in the following screenshot:
Once you've installed PlatformIO IDE, connect your ESP32 to your computer via USB. Then, find the PlatformIO button in the left panel. Next, from the Quick Access menu, click on Open:
From here, you can find the main PlatformIO window and click on Open Project:
The startup wizard will take you through...