Lesson 4

Hello ESP32

Students safely connect an ESP32, upload a first sketch, and use Serial Monitor to see setup run once and loop repeat.

Whiteboard-style robotics C++ artwork with a laptop and controller

Video

Lesson video

Move code onto a real microcontroller, then use setup, loop, upload, and Serial Monitor to prove what the board is doing.

Students practice

  • Connect an ESP32 by USB only.
  • Select board and port in Arduino IDE.
  • Upload a safe first sketch.
  • Open Serial Monitor at 115200 baud.
  • Explain setup runs once and loop repeats.

Starter sketch

void setup() {
    Serial.begin(115200);
    delay(1000);

    Serial.println("Hello, ESP32!");
    Serial.println("Setup runs once.");
}

void loop() {
    Serial.println("Loop is running.");
    delay(1000);
}

What to turn in

  • A successful ESP32 upload using USB power only.
  • Serial Monitor output at 115200 baud.
  • Changed setup and loop messages.
  • An explanation of what runs once and what repeats.