- Open Arduino IDE and go to File > Preferences.
- In the "Additional Board Manager URLs" field, enter the following URL:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json.
Click "OK" to save the changes. 3. Go to Tools > Board > Boards Manager.
- In the search bar, type "ESP32" and click on "ESP32 by Espressif Systems".
- Download the library in .zip format from the source.
- Open Arduino IDE and go to Sketch > Include Library > Add .ZIP Library.
- Browse to the downloaded .zip file and click "Open". Wait for the library to be imported.
- Extract the files to the location where the ESP32 core for Arduino is installed on your local system. Typically, the location of the installed ESP32 core for Arduino is as follows:
/home/user-name/.arduino15/packages/esp32/hardware/esp32/2.0.6/libraries
C:\Users\User-name\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7\libraries\
In the Arduino sketch, add the following line at the beginning of the code:
#include "library_name.h"
Replace "library_name" with the name of the library you imported.
Refer to the library's documentation or examples to learn how to use the library in your code.