In order to upload code to the ESP32 and use the serial console, you will need a USB to serial converter! Use either an FTDI cable or any console cable, you can use either 3V or 5V logic and power as there is level shifting on the RX pin.

The ESP32 uses a lot of current, so if you're getting flakey behavior make sure you are plugging your console cable into either a motherboard USB port or a powered USB hub. Don't use the 'extra' USB port on your monitor or keyboard.

Connect USB-Serial cable

Connect either your console cable or FTDI cable. If using FTDI, make sure the black wire goes to the GND (ground) pin

We show a Huzzah ESP8266 in this photo but the connection setup is the same

If using a console cable, connect the black wire to ground, red wire to V+, white wire to TX and green wire to RX

We show a Huzzah ESP8266 in this photo but the connection setup is the same

Don't forget you may also need to install the SiLabs CP2104 Driver or FTDI driver for your cable!

Once installed, use the Adafruit ESP32 Feather board in the dropdown

For Upload speed we've found 921600 baud works great, but use 115200 if you're having upload issues.

Blink Test

We'll begin with the simple blink test

Enter this into the sketch window (and save since you'll have to)

void setup() {
  pinMode(13, OUTPUT);
}

void loop() {
  digitalWrite(13, HIGH);
  delay(500);
  digitalWrite(13, LOW);
  delay(500);
}

Now you'll need to put the board into bootload mode. You'll have to do this before each upload. There is no timeout for bootload mode, so you don't have to rush!

  1. Hold down the GPIO0 button
  2. While holding down GPIO0, click the RESET button
  3. Release RESET, then release GPIO0

Once the ESP board is in bootload mode, upload the sketch via the IDE

During upload if you see

esptool.py v2.6
Serial port COM22
Connecting........_____....._____....._____.....____

Try resetting the board into bootloader mode again, by holding down the GPIO0 button and pressing Reset then releasing GPIO0

If the upload is successful, it should end with this message:

Hard resetting via RTS pin...

Once you see that, press the RESET button and the sketch will then run.

This guide was first published on May 12, 2019. It was last updated on Mar 08, 2024.

This page (Using with Arduino IDE) was last updated on Mar 08, 2024.

Text editor powered by tinymce.