Blink
Now you can upload your first blink sketch!
Plug in the ESP32-S2 board and wait for it to be recognized by the OS (just takes a few seconds).
Select ESP32-S2 Board in Arduino IDE
On the Arduino IDE, click: Tools -> Board -> ESP32 Arduino -> Your Adafruit ESP32-S2 board 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 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 |
It should appear under Tools -> Port as ESP32-S2 Dev Module.
Disable PSRAM (it is currently hard-faulting in Arduino)
// 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 must 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!
If you want to upload a new sketch, you will have to go through the same process:
- Reset board into ROM bootloader with DFU/BOOT0 + Reset buttons
- Select ESP ROM bootloader in Tools->Port menu
- Upload sketch
- Click reset button to launch code
We have opened an issue with Espressif and hopefully they will fix auto-reset-into-bootloader soon!