In this lesson you will learn how to install Arduino libraries and use the Serial Monitor to view messages from your ESP32. These skills are essential for debugging and understanding how your code is running. You'll need the Arduino IDE installed to follow these steps. If you haven't done so yet, follow our Installing Libraries and Using the Serial Monitor on ESP32 guide, where we go through the process of getting you and your board ready for your future projects!
This lesson is part of our ESP32 tutorials series, where we walk through ESP32 projects step by step for beginners.
What you will learn
- How Arduino libraries work
- How to install libraries using the Library Manager
- How to open and use the Serial Monitor
- How to verify communication with your ESP32
Step 1 - What is an Arduino library
A library is a collection of pre written code that makes it easier to work with hardware such as sensors displays and communication modules.
Instead of writing everything from scratch you install a library and use its functions in your sketch.
Most ESP32 projects rely on one or more libraries.
Step 2 - Open the Library Manager
- Within the Arduino IDE, click Sketch
- Click Include Library
- Click Manage Libraries

The Library Manager window will open.
Step 3 - Install a library
As a demonstration you will install a commonly used library.
- In the Library Manager search box type Adafruit Unified Sensor
- Select Adafruit Unified Sensor
Click Install

If prompted to install dependencies allow the IDE to proceed.
Step 4 - Confirm the library is installed
Once installed the library will show as installed in the Library Manager.
You can also confirm by checking the Examples menu.
- Click File
- Click Examples
- Scroll down to find the newly installed library

If examples appear the library is ready to use.
Step 5 - Open the Serial Monitor
The Serial Monitor allows your ESP32 to send text messages back to your computer. This is one of the most important tools for troubleshooting. Keep your ESP32 board connected for this.
To open it
- Click Tools
- Click Serial Monitor

A new window will open at the bottom of the screen.

Step 6 - Set the correct baud rate
The baud rate controls the speed of communication between your ESP32 and the computer.
- In the Serial Monitor window find the baud rate menu
- Set it to 115200
This baud rate is commonly used with ESP32 boards.
If the baud rate does not match the code, you will see unreadable text.

Step 7 - Upload a Serial test sketch
Copy and upload the following test sketch.
void setup() { Serial.begin(115200); delay(1000); Serial.println("ESP32 Serial Monitor Test"); } void loop() { Serial.println("ESP32 is running"); delay(1000); }
Step 8 - View Serial output
Once the upload is complete open the Serial Monitor if it is not already open.
You should see messages appearing once per second.
If no text appears
- Check the selected port
- Confirm the baud rate is set to 115200
- Press the reset button on the ESP32 if present

ESP32 Lessons
- ESP32 Tutorials Hub
- Lesson 1: ESP32 Setup using Arduino IDE
- Lesson 2: ESP32 Libraries and Using the Serial Monitor
- Lesson 3: ESP32 LED Blink
- Lesson 4: ESP32 Using a Passive Buzzer Tutorial
Lesson complete
You have successfully installed a library and used the Serial Monitor to communicate with your ESP32.
Next lesson: ESP32 LED Blink Tutorial, the classic first hardware project using an external LED.