Getting Started & Development Environments

There is more than one way to write code for the ESP32. This lesson introduces the three real, currently-used options, compares them, and then walks through setting up the option this track recommends for beginners: the Arduino IDE.

This page's code and wiring instructions are a preview, not something you can run right on this website - this server runs PHP, not the ESP32's own firmware.

Three Ways to Program an ESP32

EnvironmentLanguageBest for
Arduino IDE C/C++ (Arduino-style functions) Beginners - the easiest on-ramp, with a huge community and library ecosystem. Recommended starting point for this track.
MicroPython Python Readers who already know Python and want that syntax - note the ecosystem and library support is smaller than Arduino's.
ESP-IDF C (FreeRTOS-based) Serious/production projects needing full control of both CPU cores and every peripheral - Espressif's own official native SDK, with a steeper learning curve.

Arduino IDE - Uses Arduino-Style Functions

The Arduino IDE runs your code through familiar functions like pinMode(), digitalWrite(), and analogRead() - the same style used across the whole Arduino ecosystem, which is why it is such a gentle starting point if you have ever touched an Arduino Uno before, and still very approachable if you have not. This track's remaining lessons all use Arduino-style code examples.

MicroPython - Python On the Chip

MicroPython is a separate firmware image that you flash onto the ESP32 once; after that, you write and run .py scripts directly on the chip instead of compiling C/C++ sketches. It is a good option if you already think in Python and would rather keep that syntax, though be aware that its library ecosystem for ESP32 peripherals is smaller than what Arduino offers.

ESP-IDF - Espressif's Native SDK

ESP-IDF (Espressif IoT Development Framework) is the chip maker's own official, native, FreeRTOS-based SDK, written in C. It gives you the most power and flexibility - full control over both CPU cores and every peripheral - but with a noticeably steeper learning curve than Arduino or MicroPython. Treat it as the option to grow into for serious or production-grade projects, not as the first thing to reach for when starting out.

Setting Up the Arduino IDE for ESP32 (Recommended Path)

Follow these steps to get from a fresh install to your first upload:

  1. Download and install the Arduino IDE from the official Arduino website.
  2. Open the IDE's Boards Manager and add the ESP32 boards package, following Espressif's official Arduino-ESP32 installation instructions (the package is added and installed through the Boards Manager's board-index mechanism - consult Espressif's current documentation for the exact steps and URL, since installation details can change over time).
  3. Once installed, open Tools > Board and select the entry matching your specific board (for example, an "ESP32 Dev Module" style entry, or the specific board name if the package lists it).
  4. Connect your board via USB, then open Tools > Port and select the COM port (Windows) or device path (macOS/Linux) that appeared when you plugged it in.
  5. Open a simple example sketch (such as the classic Blink example, adapted to your board's GPIO), click Upload, and watch the IDE compile and flash it to your board.
The next lesson, GPIO Basics: Blinking an LED, walks through exactly this first sketch with full code and wiring.
Recap: Three real options exist - Arduino IDE (recommended for beginners), MicroPython (if you know Python), and ESP-IDF (for serious/production control). Getting started with Arduino IDE means: install the IDE, add the ESP32 boards package via Boards Manager, select your board and COM port, then upload a sketch.
Next steps: Continue to GPIO Basics: Blinking an LED for your first real project.