Skip to content

Arduino Example

Now that we've installed the espressif boards package in Arduino, it's time to upload our first sketch to make sure everything is working properly.

This basic example makes sure the board package installed correctly and the board accepts programming properly to blink the green STAT LED on the board every second. Open the example in Arduino by navigating to File > Examples > Basics > 01-Blink.

You will need to modify LED_BUILTIN to pin 0 like so:

LED Builtin is Defined

Code changes for LED_BUILTIN

Make sure you have the board (ESP32 Dev Board) and select your applicable COM port:

Board and Port selected

Board and Port selected

Uploading Code

Attention

While most ESP32 boards include an auto-reset and auto-bootload circuitry, these have been removed from the ESP32 Pro Mini to save space. This means you will need to manually enter and exit the bootloader mode every time new code is to be loaded.

Before uploading, you'll need to put the board into the serial bootloader with the BOOT button. Holding down the BOOT button, while connecting the board to a computer through its USB-C connector or resetting the board will cause the MCU to enter the Firmware Download mode and its serial bootloader. The board will remain in this mode until it is power cycled by either pressing the RST button or the board is unplugged/plugged in.

  1. Hold the BOOT button down.
  2. Reset the MCU. This can be accomplished by:
    • Plugging the board into a USB to Serial board.
    • Or, press and releasing the RST button while holding BOOT.
  3. Release the BOOT button.
  4. After programming is completed, reboot the MCU.
    • Press the RST button.
    • Or, power cycle the board.

Once the board is in the serial bootloader, you can upload code through the Arduino interface. Once your code is uploaded, you will need to hit the RST button to get your sketch running.

Blink Example

Blink Example