Getting Started with the ESP32 Development Board

This article is a getting started guide for the ESP32 development board. If you’re familiar with the ESP8266, the ESP32 is its sucessor. The ESP32 is loaded with lots of new features. The most relevant: it combines WiFi and Bluetooth wireless capabilities and it’s dual core.

Find the differences between the ESP32 and the ESP8266: ESP32 vs ESP8266 – Pros and Cons


In this post, we’ll be using the ESP32 DEVKIT DOIT board as a reference. But the information on this page is also compatible with other ESP32 development boards with the ESP-WROOM-32 chip.

Here’s some examples of ESP32 boards:

Where to Buy?

Our ESP32 projects are build using mainly the ESP32 DEVKIT DOIT board and that’s the one we recommend getting.

You can also read the following article that compares several ESP32 development boards: ESP32 Development Boards.

You can use the preceding links or go directly to to find all the parts for your projects at the best price!


When it comes to the ESP32 chip specifications, you’ll find that:

  • The ESP32 is dual core, this means it has 2 processors.
  • It has Wi-Fi and bluetooth built-in.
  • It runs 32 bit programs.
  • The clock frequency can go up to 240MHz and it has a 512 kB RAM.
  • This particular board has 30 or 36 pins, 15 in each row.
  • It also has wide variety of peripherals available, like: capacitive touch, ADCs, DACs, UART, SPI, I2C and much more.
  • It comes with built-in hall effect sensor and built-in temperature sensor.

Specifications – ESP32 DEVKIT V1 DOIT

Number of cores2 (dual core)
Wi-Fi2.4 GHz up to 150 Mbits/s
BluetoothBLE (Bluetooth Low Energy) and legacy Bluetooth
Architecture32 bits
Clock frequencyUp to 240 MHz
Pins30 or 36 (depends on the model)
PeripheralsCapacitive touch, ADC (analog to digital converter), DAC (digital to analog converter), I2C (Inter-Integrated Circuit), UART (universal asynchronous receiver/transmitter), CAN 2.0 (Controller Area Netwokr), SPI (Serial Peripheral Interface), I2S (Integrated Inter-IC Sound), RMII (Reduced Media-Independent Interface), PWM (pulse width modulation), and more.

To learn more about the ESP32 GPIOs, read our GPIO reference guide: ESP32 Pinout Reference: Which GPIO pins should you use?

Programming Environments

The ESP32 can be programmed in different programming environments. You can use:

In our projects, we program the ESP32 mainly with Arduino IDE or MicroPython.

Preparing the ESP32 Board in Arduino IDE

There’s an add-on for the Arduino IDE allows you to program the ESP32 using the Arduino IDE and its programming language. Follow one of the next tutorials to prepare your Arduino IDE:

ESP32 Pinout Guide

The ESP32 has more GPIOs with more functionalities compared to the ESP826.

With the ESP32 you can decide which pins are UART, I2C, or SPI – you just need to set that on the code. This is possible due to the ESP32 chip’s multiplexing feature that allows to assign multiple functions to the same pin. If you don’t set them on the code, the pins will be used as default – as shown in the figure below (the pin location can change depending on the manufacturer).

Version with 30 GPIOs

Version with 36 GPIOs

You can read our detailed ESP32 Pinout Reference Guide.

Upload Code to the ESP32 using Arduino IDE

To show you how to upload code to your ESP32 board, we’ll build a simple example to blink an LED.

Copy the following code to your Arduino IDE:


// ledPin refers to ESP32 GPIO 23
const int ledPin = 23;

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin ledPin as an output.
  pinMode(ledPin, OUTPUT);

// the loop function runs over and over again forever
void loop() {
  digitalWrite(ledPin, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                  // wait for a second
  digitalWrite(ledPin, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                  // wait for a second

View raw code

In this code, we’re controlling an LED connected to GPIO 23.

const int ledPin = 23;

So, connect an LED to your ESP32 by following the next schematic diagram.

Important: always check the pinout for your specific board before building any circuit.

Here’s a list of the parts you need to build this previous circuit:

Plug your ESP32 development board to your computer and follow these next instructions:

1) Go to Tools > Board, scroll down to the ESP32 section and select the name of your ESP32 board. In my case, it’s the DOIT ESP32 DEVKIT V1 board.

2) Go to Tools > Port and select a COM port available.

3) Press the upload button.

That’s it!

Note: If you get the following error when trying to upload code, it means that your ESP32 is not in flashing/uploading mode.

Failed to connect to ESP32: Timed out... Connecting...

To upload code, you need to follow the next steps (make sure you have the right board selected:

  • Hold-down the “BOOT” button in your ESP32 board
  • After you see the  “Connecting….” message in your Arduino IDE, release the finger from the “BOOT” button:
  • After that, you should see the “Done uploading” message.

That’s it. After uploading the new sketch, you can press the “ENABLE” button to restart the ESP32 and run the new uploaded sketch.

Note: Learn how to fix the “Failed to connect to ESP32: Timed out waiting for packet header” error permanently when trying to upload new code to your ESP32 board once for all.


After uploading the code, the LED connected to GPIO 23 should be blinking every other second.

Wrapping up

We hope you’ve found this getting started guide useful. The blinking LED is just a simple project to get you started with the ESP32. This is also a great way to learn the procedure you need to do to upload code to your board.

If you like ESP32, we have more than 20 projects with the ESP32 you can find in our repository of ESP32 projects:

You may also like:

If you like ESP32 make sure you subscribe to our blog, so you don’t miss upcoming projects.

Do you have any questions? Leave a comment down below!

Thanks for reading,

P.S. If you like the ESP32, you might also enjoy our ESP32 course: Learn ESP32 with Arduino IDE

Build Web Server projects with the ESP32 and ESP8266 boards to control outputs and monitor sensors remotely. Learn HTML, CSS, JavaScript and client-server communication protocols DOWNLOAD »

Build Web Server projects with the ESP32 and ESP8266 boards to control outputs and monitor sensors remotely. Learn HTML, CSS, JavaScript and client-server communication protocols DOWNLOAD »

Enjoyed this project? Stay updated by subscribing our newsletter!

70 thoughts on “Getting Started with the ESP32 Development Board”

    • It won’t be able to stream, but with the ESP you can create a web server that has a camera stream embedded (for example, as you would embedded a youtube video in an HTML page).

  1. How about a little more about the dev board? What are the user-accessible components – buttons, ports, pins,. A look at the back of the board? What are the dimensions? When you said press the Upload button it sounds like there is a button on the board called the Upload button but I think you meant select Upload from the Sketch menu in the Arduino IDE. Is that correct? You might want to make that clearer.

    • Hi Don,
      Thanks for the comment! The back of the board has no components, it looks like the ESP-12E NodeMCU Kit module.
      There’s only two buttons in the ESP32 Dev Module: EN and BOOT. I’ve updated the image in the blog post to highlight those two buttons and make it easy to see them.
      The Upload button I’ve mentioned in the post was for the Arduino IDE – I’ve also fixed that sentence.
      The image in the “Pin assignment” section describes exactly the function of each pin.

      I hope this helps,
      Thank you!

  2. Rui I am a bit confused about your course Build a Home Automation System for $ 100 because I see the need to make a wiring for each element that wants to automate starting from a single ESP8266 this prevents me from using it in an existing construction wasting the wireless qualities of the ESP8266 module by Please tell me what I understood? Thank you

  3. Thanks for posting this. So many people think that going with ESP8266 and ESP32 you have to learn a whole new system and can’t run under the Arduino ide. So many are stuck with limited I/O, processing power, etc. So hopefully getting this sort of information into their hands will help. Thanks.

  4. Great tutorials, you have got me into both the ESP 32 and ESP8266.

    Worth pointing out that the Arduino IDE now has lots of examples of using these devices. I used these with your tutorial and got going by just plugging the device into the PC USB port – no extra circuitry necessary.

    • Hi Ken!
      That’s true there are lots of examples on the Arduino IDE that help you get started! That’s great for beginners!
      Thank you for sharing!
      Sara 🙂

      • I also use Visual Micros IDE for Arduino which uses the Arduino IDE but is an add on for Microsoft Visual Studio. That is really nice because it makes available the power of Visual Studio with for example Intellisense, online debugging and GIT sotware backup and revision control. The community edition of VS is free for small scale users, as is Visual Studio Team Services – their GIT Server. Your tutorials for the ESP32 and ESP8266 work in this environment too.

        Best Regards


  5. So you have to press the button on the esp32 to upload. Won’t that little button wear out soon . for me because I make too many mistakes and have to reload. Is there a work around?

    • Hi Franklin.
      In our first ESP32 boards we didn’t need to press the button to upload code.
      But recently, we have to do that every time we want to upload new code.
      I know it is a bit frustrating to press the boot button every time you need to upload new code, specially when there are a lot a mistakes and we want to test things right away.
      Unfortunately I don’t have any work around to share. You really need to press that button.
      However, if anyone knows any work around, please share.
      Sara 🙂

  6. Thank you Rui and Sara for sharing. It has helped me tremendously as I am sure many others. The projects are well put together and very helpful and easy to understand. You are kind in your answers.

    • Hi Kevin.
      Yes, the ESP32 has analog pins: digital to analog converter pins(DAC) and analog to digital converter (ADC) pins.
      If you want to read analog sensors, just use the ADC pins. These are the ADC pins: GPIOs: 0, 2, 4, 12, 13, 14, 15, 25, 26, 27 32, 33, 34, 35, 36, and 39.
      If you want to produce analog signals, use the DAC pins: GPIO25 and 26.
      Sara 🙂

  7. Trying to compile the blinking LED project I get a compilation error in line 34:
    Importers of: No module named serial
    Can you help, please?

  8. Although I am not running Windows but Ubuntu 18, the problem was the same: missing module “serial” in python. In my case the solution was to run
    sudo apt-get install python-serial
    Now it works OK!!!

  9. Are you planing to create similar ESP32 course using esp-idf instead of arduino?
    or can you please refer me to a website that teaches how to use esp-idf? Thank you very much

    • Hi Saber.
      At the moment, we don’t have anything planned about esp-idf.
      We’re working on a new course using MicroPython that will be available soon.
      I don’t know any good website that teaches how to use esp-idf.
      A good starting point is the official documentation:
      I hope this helps.
      Sara 🙂

  10. So far great work :)..

    question, I used this to upload a sketch, it worked the first time. Now I want to do it again but it fails..

    any sugestions?

    the error i get from the arduino IDE;
    /////////////////// v2.3.1
    Chip is ESP32D0WDQ6 (revision 1)

    A fatal error occurred: Timed out waiting for packet header
    A fatal error occurred: Timed out waiting for packet header

      • Thnx,

        well, I guess I did it wrong a couple of times, again pressing the boot button until connecting…. and now it worked again 😀

        thnx for the quick response.

  11. Hi
    i am working on esp32 dev kit,for developing Home automation,
    suddenly i got struck with spi flash boot error, i am trying to resolve it, but we cannot, please can any one help us solve the problem.

  12. Nice example but you don’t mention that if you use GPIO 2 instead of GPIO23, there is already a blue LED connected to the dev board.

  13. Ok I am completely a nooby to this but can you tell me what kind of computer you are hooking the ESP32 up to in order to write the code?

  14. I’m running a Wemos ESP32 OLED board. GREAT tutorial! I would never have figured out to add the “Wire.begin(5,4);” line without you. I’m running the Adafruit SSD1306_128x64_i2c sample and don’t understand the display.startscrolldiagright(start, end) function. It doesn’t seem to do anything. Seems 4 parameters would be needed for a diagonal scroll? I’ve looked at the Adafruit_SSD1306.cpp library code without understanding what it does. Is more info on the library available?

  15. Hello Sara
    I am using ESP32 Doit devkit v1 as you sugested, from Banggood, but after compiling, it cannot connect to upload the code.
    The port is correct because when i plug it first time it did show me the port installed successfully. Here is the error message. What i can do ?
    Thank you
    Arduino: 1.8.12 (Windows 7), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 115200, None”

    Sketch uses 622174 bytes (47%) of program storage space. Maximum is 1310720 bytes.
    Global variables use 38736 bytes (11%) of dynamic memory, leaving 288944 bytes for local variables. Maximum is 327680 bytes.
    H:\Users\Nelu\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\2.6.1/esptool.exe –chip esp32 –port COM13 –baud 115200 –before default_reset –after hard_reset write_flash -z –flash_mode dio –flash_freq 80m –flash_size detect 0xe000 H:\Users\Nelu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/partitions/boot_app0.bin 0x1000 H:\Users\Nelu\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4/tools/sdk/bin/bootloader_dio_80m.bin 0x10000 H:\Users\Nelu\AppData\Local\Temp\arduino_build_604947/Get_Mac.ino.bin 0x8000 H:\Users\Nelu\AppData\Local\Temp\arduino_build_604947/Get_Mac.ino.partitions.bin v2.6
    Serial port COM13
    Connecting…….._____….._____….._____….._____….._____….._____…..____An error occurred while uploading the sketch

    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

  16. What i can read when i press TOOLS
    Board-Doit ESP32 Devkit V1
    Upload speed 115200
    Flash frequency 80 MHz
    Core debug level none
    When i press GET BOARD INFO I GET THIS:
    BN Unknown board
    VID 10C4
    PID EA60
    SN none
    Programer AVRISP mkII

    I bought a batch of 10 pieces.
    I tried 3 and all they do the same.
    Please help.
    Thank you

    • As Sara mentioned it in previously, putting a 10 uF capacitor between the EN and GND will let the IDE upload the code automatically without the need to press the EN button.

      • Thank you for suggestion Teddy,
        But i had a batch of 10 ESP received from Chine and they were not mounted anywhere.
        I just had the USB cable attached.
        I have the habit to get the MAC for all, when i get them.
        Next time i will follow your advice, put it in a bread board and use the capacitor.

  17. I just got an esp32 that is different looking than those above. ESP-32 Dev kit C V4.

    I didn’t notice when I bought it but it doesn’t seem to have an internal antenna but does the the jack for an external one. Very happy about that!

    Got it here so you can have a look:

    Might want to add that one to the pics above. 😉


  18. I developed a device with ESP32 DOIT.
    I want to change and move it to ESP32 HUZZAH32.
    The reason is the battery charger on board for Adafruit module
    I read the whole data sheet but i am confused about the pins i can use without any conflict.
    On the DOIT i had, first a membrane keypad.
    4 Outputs for horizontal lines with the following GPIO:
    3 Inputs for vertical line. Each line is pulled up by 1K resistor:

    2 Leds Outputs:

    1 Output = Enable control line for your Adafruit MiniBoost 5V @ 1A – TPS61023:

    1 Input from and RFID Reader (TX-line of the reader)

    I need help please. Just to select some pins coresponding to the one on DOIT and without any conflict.
    Adafruit support did not help. They said to post in forum, there nobody read it or answer, so i am stuck.
    Please help.
    Thank you very much.

    • Hi Ion.
      I have not experience with that board.
      But, taking a look at the pinout, I think you can use these pins:
      4 Outputs for horizontal lines with the following GPIO:
      KH1-26 –> 26 (Huzzah) You can use the same
      KH2-19 –> 19 (Huzzah) You can use the same
      KH3-18 –> 18 (Huzzah) You can use the same
      KH4-23 –> 23 (Huzzah) You can use the same

      3 Inputs for vertical line. Each line is pulled up by 1K resistor:
      KV1-35 –> 32 (Huzzah) There is no GPIO 35 on the Huzzah, so you can use any other pin that can act as an input
      KV2-33 –> 33 (Huzzah) You can use the same
      KV3-34 –> 34 (Huzzah) You can use the same

      2 Leds Outputs:
      Red-21 –> 21 (Huzzah) You can use the same
      Green-22 –> 22 (Huzzah) You can use the same

      1 Output = Enable control line for your Adafruit MiniBoost 5V @ 1A – TPS61023:
      Pwr_On-5 –> 5 (Huzzah) You can use the same

      1 Input from and RFID Reader (TX-line of the reader)
      RFID_In-25 –> 25 (Huzzah) You can use the same

      I think these pins will work taking a look at the pinout, but I haven’t experimented it.

  19. i still cannot connect after holding boot. anything else i am doing wrong? i have selected the correct board. th ecode compiles but it will not upload. still getting the following.

    Arduino: 1.8.13 (Windows 10), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 921600, None”

    Sketch uses 856262 bytes (65%) of program storage space. Maximum is 1310720 bytes.

    Global variables use 39696 bytes (12%) of dynamic memory, leaving 287984 bytes for local variables. Maximum is 327680 bytes. v2.6

    Serial port COM1


    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

    A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

    This report would have more information with
    “Show verbose output during compilation”
    option enabled in File -> Preferences.

  20. Hello,
    I have a question at which i cannot find the answer, and Google gave up.
    An ESP32 development kit has an 5V power pin, an internal regulator down to 3.3 volts and the processor.
    At which voltage works the internal processor ?
    I mean, if i supply a 3.3V or 3.0V , and not 5V at power pin, meaning the input of the regulator, what will be the output at processor level, and if the whole development kit can function ?
    What is the lowest voltage i can supply to the 5V pin , and have the system working ?

  21. Hi,
    I just bought two ESP32 wroom
    when I connect the USB to my computer (Win10), the board is not recognized by the device manager. I changed the cable and I tried with the second ESP. The problem is always the same.
    I think there is some config problem with my PC, can you advise me ?

    • in addition : I tried to connect the board to another PC (Win10) and it works !

      tge driver is the same, I copy the driver from the Win110PC to the Win11PC but no result

      • Hi Sara,
        thank you for your help.
        I checked the informations :
        – the cable is an USB cable including data wires. (it works with Arduino and other boards)
        – the USB drivers is not missing. For being sure I perform a new downloaded and install

        the cable and the board are OK and work when plugged to another computer running Win10, I compared the 2 computers (the Win10 and the Win11) the drivers are the same. It’s seems the problem come from Win11.

        what is your advise

  22. Hi Sara

    I tried to manually install the driver with :

    RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 C:\Users\yodra\Downloads\CP210x_Universal_Windows_Driver\silabser.inf

    nothing happends and the file silabser.sys is not copied to the driver directory

    it seems something block or prevent the driver installation

    please advise , I am lost ….

      • Hi,

        I downloaded the driver from then I right click on the inf file then Install as said in the instruction text.

        and nothing, no instruction, nothing happend

        that’s why I tried to install manually with the command RUNDLL32.EXE but no result

        • Hi Sara,

          Thank for your answer.

          there is no popup whenI right click on the inf file. Nothing happend.

          I tried all ways to install manually, nothing works

          I received another ESP32 bought at another brand (at Bangood store), this board is equiped with an cp2102 and ….. it works on Win11. I haves not been obliged to install the driver, it use the standard Microsoft driver (I checked with device manager)

          So may be the first ESP has a hardware problem, or it use a fake Cp2102,

          anyway, I can use it, I will desolder the cp2102 chips and replace with a CH340

          Thank you for your support


          • Hi.
            Are you sure the older board was using the CP2102?
            Maybe it had a CH340?
            Also, did you check your USB cable? Some USB cables are power only and don’t transfer data.

Leave a Comment

Download our Free eBooks and Resources

Get instant access to our FREE eBooks, Resources, and Exclusive Electronics Projects by entering your email address below.