esp32 getting started arduino ide

ESP32 Getting Started Guide: Using Arduino IDE

By John Taylor
AD

So, you've got your hands on an ESP32 and you're ready to dive into the world of IoT and_HOME> appliances? Fantastic! The Arduino IDE is a great place to start programming this powerful microcontroller. Let's get you set up and running your first ESP32 project in no time.

Before we dive in, you'll need to have the Arduino IDE installed on your computer. If you haven't already, download and install it from the official Arduino website. Once that's done, let's get your ESP32 recognized and ready to go.

Setting Up the Arduino IDE for ESP32

The Arduino IDE is compatible with the ESP32, but it needs a few tweaks to recognize it. Don't worry, it's nothing too daunting. Let's get started!

AD
๐Ÿ”ง Install ESP32 in Arduino IDE โ€“ Quick & Easy Setup Guide!
๐Ÿ”ง Install ESP32 in Arduino IDE โ€“ Quick & Easy Setup Guide!
10 ESP32 Skills Every Maker Should Learn
10 ESP32 Skills Every Maker Should Learn
Year in Review 2025 โ€“ Random Nerd Tutorials | Random Nerd Tutorials
Year in Review 2025 โ€“ Random Nerd Tutorials | Random Nerd Tutorials

First things first, you'll need to install the ESP32 board definitions and the ESP32 libraries. The Arduino IDE makes this easy with a simple Sketch Import. Here's how:

Installing Board Definitions

Open the Arduino IDE and go to Tools > Board > Boards Manager... In the Boards Manager window, search for 'esp32' and install the esp32 board definitions by espressif. This will allow your IDE to recognize your ESP32.

ESP32 ESP-NOW Getting Started Tutorial with Arduino IDE
ESP32 ESP-NOW Getting Started Tutorial with Arduino IDE
Master FreeRTOS on ESP32 & Arduino: A Comprehensive Guide
Master FreeRTOS on ESP32 & Arduino: A Comprehensive Guide
Getting Started with ESP-NOW (ESP32 with Arduino IDE) | Random Nerd Tutorials
Getting Started with ESP-NOW (ESP32 with Arduino IDE) | Random Nerd Tutorials

Once installed, you should see ESP32 as an option under Tools > Board. Select your ESP32 board from the list (e.g., ESP32 Dev Module).

Installing ESP32 Libraries

Next, you'll need to install the ESP32 libraries. Again, the Arduino IDE makes this easy with the Library Manager. Go to Sketch > Include Library > Manage Libraries... In the Library Manager window, search for 'esp32' and install the following libraries:

AD
  • esp32
  • ESP32 BSP
  • WiFi
  • AsyncTCP
  • ESPAsyncWebServer

The esp32 library is essential for basic ESP32 functionality, while the BSP (Board Support Package) library provides board-specific functions. The WiFi library is necessary for connecting your ESP32 to the internet, and the remaining libraries are used for creating web servers.

Simulate ESP32 Projects in VS Code with Wokwi (Beginner Guide!)
Simulate ESP32 Projects in VS Code with Wokwi (Beginner Guide!)
ESP32 Tutorial: ESP32 OTA Update - Wireless Programming with Arduino IDE (Step-by-Step Guide)
ESP32 Tutorial: ESP32 OTA Update - Wireless Programming with Arduino IDE (Step-by-Step Guide)
the back side of an electronic device with many colors and numbers on it, all labeled in
the back side of an electronic device with many colors and numbers on it, all labeled in
an electronic device is shown in this poster, with instructions on how to use it
an electronic device is shown in this poster, with instructions on how to use it
ESP8266 0.96 inch OLED Display with Arduino IDE | Random Nerd Tutorials
ESP8266 0.96 inch OLED Display with Arduino IDE | Random Nerd Tutorials
the esp522 getting started with everything you need to know about this project
the esp522 getting started with everything you need to know about this project

Blinking an LED on the ESP32

Now that your Arduino IDE is set up for the ESP32, let's write your first sketch! For this, we'll use the classic 'Blink' sketch, but with an LED connected to one of the ESP32's GPIO pins.

Under File > Examples, navigate to 01.Basics > Blink. This will open the Blink sketch in a new window. Go ahead and upload this sketch to your ESP32 using the upload button (the right-facing arrow) or press Ctrl+U if you're on Windows or Linux, or Cmd+U if you're on a Mac.

AD

Hardware Setup

Before you can upload the sketch, you'll need to connect an LED to your ESP32. You can use any color or size, but for this example, let's use an LED with a longer leg (positive, known as anode) and a shorter leg (negative, known as cathode).

a woman with long curly hair wearing a blue shirt smiles at the camera while standing in front of a white wall
a woman with long curly hair wearing a blue shirt smiles at the camera while standing in front of a white wall
a hand holding an electronic device with the text step guide nodemcu / esp8
a hand holding an electronic device with the text step guide nodemcu / esp8
DAY 5 โ€” ESP32 Explained | Wi-Fi & Bluetooth Microcontroller Notes
DAY 5 โ€” ESP32 Explained | Wi-Fi & Bluetooth Microcontroller Notes
Getting Started with the ESP32 - Using the Arduino IDE
Getting Started with the ESP32 - Using the Arduino IDE
How to Set Up ESP32 in Arduino IDE: A Beginner's Guide
How to Set Up ESP32 in Arduino IDE: A Beginner's Guide
01 Getting Started with ESP32 | IoT Development | Arduino IDE setup | ESP32 pinout | GPIO Led Blink
01 Getting Started with ESP32 | IoT Development | Arduino IDE setup | ESP32 pinout | GPIO Led Blink
Introduction to ESP32 Programming Series - The Engineering Projects
Introduction to ESP32 Programming Series - The Engineering Projects
Custom Arduino Library for ESP32 ๐Ÿ“ฆโš™๏ธ
Custom Arduino Library for ESP32 ๐Ÿ“ฆโš™๏ธ
๐ŸŒ Build an ESP32 Web Server to Control LEDs (Step-by-Step Guide!)
๐ŸŒ Build an ESP32 Web Server to Control LEDs (Step-by-Step Guide!)
Reprogram Sonoff Smart Switch Web Server | Random Nerd Tutorials
Reprogram Sonoff Smart Switch Web Server | Random Nerd Tutorials
an esp232 chip is being used to control the lvgl
an esp232 chip is being used to control the lvgl
Better Debugging for Arduino IDE: SerialDebug Library | Random Nerd Tutorials
Better Debugging for Arduino IDE: SerialDebug Library | Random Nerd Tutorials
ESP32 Bluetooth Classic with Arduino IDE - Getting Started | Random Nerd Tutorials
ESP32 Bluetooth Classic with Arduino IDE - Getting Started | Random Nerd Tutorials

Connect the longer leg (anode) of the LED to one of the ESP32's GPIO pins. For this example, let's use GPIO2. Connect the shorter leg (cathode) to one of the ESP32's ground (GND) pins. Once your hardware is set up, your LED should blink every second!

The ESP32 is a versatile microcontroller, and with the Arduino IDE, you've just scratched the surface of what it can do. From here, you can explore the vast world of ESP32 projects, from weather stations to smart home devices. Happy coding!

AD
AD