Blink
Now you can upload your first blink sketch!
Plug in the ESP32-S2/S3 board and wait for it to be recognized by the OS (just takes a few seconds).
Select ESP32-S2/S3 Board in Arduino IDE
On the Arduino IDE, click:
Tools -> Board -> ESP32 Arduino -> Your Adafruit ESP32-S2/S3 board
The screenshot shows Metro S2 but you may have a different board. Make sure the name matches the exact product you purchased. If you don't see your board, make sure you have the latest version of the ESP32 board support package
Before we upload a sketch, place your ESP32-S2/S3 board into ROM bootloader mode.
Look for the Reset button and a second DFU / BOOT0 button
HOLD down the DFU/Boot0 button while you click Reset. Then release DFU/Boot0 button
The GIF shows a Metro S2 but your board may look different. It will still have BOOT and Reset buttons somewhere
It should appear under Tools -> Port as ESP32-S2/S3 Dev Module.
// the setup function runs once when you press reset or power the board void setup() { // initialize built in LED pin as an output. pinMode(LED_BUILTIN, OUTPUT); // initialize USB serial converter so we have a port created Serial.begin(); } // the loop function runs over and over again forever void loop() { digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
And click upload! After uploading, you may see something like this:
And click upload! After uploading, you may see something like this, warning you that we could not get out of reset.
This is normal! Press the RESET button on your board to launch the sketch
That's it, you will be able to see the red LED blink. You will also see a new serial port created.
You may call Serial.begin();
in your sketch to create the serial port so don't forget it, it is not required for other Arduinos or previous ESP boards!
You can now select the new serial port name which will be different than the bootloader serial port. Arduino IDE will try to use auto-reset to automatically put the board into bootloader mode when you ask it to upload new code
If you ever DON'T see a serial port, or something is not working out with upload you can always manually enter bootloader mode:
- Reset board into ROM bootloader with DFU/BOOT0 + Reset buttons
- Select the ESP32S2/S3 Dev Board ROM bootloader serial port in Tools->Port menu
- Upload sketch
- Click reset button to launch code
Text editor powered by tinymce.