ESP32 Bench
Boards: ESP32, S3, C3
Flash and monitor: Web Serial
← All projects

Blink and heartbeat

Toggle the LED on GPIO 2 and print a tick every second. The first thing to flash on any new board.

Starter5 min115200 baud
Fig. 1. Pins this project uses on the ESP32-DevKitC V4, 38 pin. USB connector at the bottom.

Wiring

FromTo boardNote
LED anode, through 220 ΩGPIO 2Skip if your board has an onboard LED
LED cathodeGND

Tested on this board

Not run on this board yet. Treat the wiring and code as a first draft.

Firmware, Arduino sketch for ESP32 Dev Module

const int LED = 2;

void setup() {
  Serial.begin(115200);
  pinMode(LED, OUTPUT);
}

void loop() {
  digitalWrite(LED, HIGH);
  delay(500);
  digitalWrite(LED, LOW);
  delay(500);
  Serial.printf("tick %lu ms\n", millis());
}

Parts

QuantityPartWhere to buy
1×ESP32 dev boardBuy at Amazon
1×LED and 220 Ω resistor, only if your board has no LED on GPIO 2

Amazon buy links may include an Associates tag, and this site may earn a commission from qualifying Amazon purchases at no extra cost to you. Adafruit links are direct.

Libraries

None beyond the ESP32 Arduino core.

Load it

  1. In the Arduino IDE, install the esp32 board package and pick the board named above the sketch.
  2. Paste the sketch, choose the board's port and upload. Hold BOOT if the upload stalls at Connecting.
  3. Close the IDE's serial monitor, then open the bench here to watch the output.