Lesson 1 of 10

Getting Started with the Arduino IDE

Meet your robot's control center! 🖥️

Mission Briefing

By the end of this mission, you will be able to:

  • Explain what the Arduino IDE is and why programmers use it

  • Install the Arduino IDE and add ESP32 board support

  • Identify the main parts of the IDE: Toolbar, Sketch editor, and Serial Monitor

  • Explain the difference between setup() and loop()

Let's Get Started

Every robot needs a brain, and every brain needs a way to receive instructions. That's exactly what the Arduino IDE is: a simple computer program that lets you write code and upload it straight onto your ESP32 board.

Think of the Arduino IDE like a control center. You type instructions, hit upload, and your board springs to life and follows them exactly, no arguing, no forgetting, just pure obedient execution.

Robo says: "Before I can do anything, someone has to write my instructions and send them to me. That someone is about to be YOU!"

What Is A Sketch?

In the Arduino world, a program is called a sketch. Every sketch you'll ever write has the exact same skeleton: two special functions named setup() and loop().

  • setup() — runs exactly ONE time, right when your board powers on or resets. Perfect for one-time setup tasks like configuring pins.

  • loop() — runs over and over again, forever, for as long as your board has power. This is where the ongoing action happens.

Every project in this course — blinking LEDs, reading buttons, controlling motors — will be built from just these two functions.

Touring The IDE

When you open the Arduino IDE, you'll see a few key areas worth knowing by name:

  • Toolbar — buttons for Verify (check your code for errors) and Upload (send your code to the board)

  • Sketch editor — the big text area where you write your code

  • Serial Monitor — a window that shows messages your board sends back to your computer, incredibly useful for debugging

Equipment

  • ESP32 board
  • USB cable
  • Computer

Activity

Install the Arduino IDE, add ESP32 board definitions through the Boards Manager, and open the IDE to explore the Toolbar, Sketch editor, and Serial Monitor.

Code

// Every Arduino sketch starts with this skeleton
void setup() {
// Runs ONCE when the board powers on
Serial.begin(115200); // Start communication at 115200 baud
Serial.println("Robot is booting up!");
}
void loop() {
// Runs FOREVER, over and over
Serial.println("I am alive!");
delay(1000);
}

Did You Know?

  • • The name "sketch" comes from the original Processing programming environment that Arduino's creators borrowed their IDE design from — early developers thought of code as a quick "sketch" of an idea, not a finished masterpiece!

🔧 Try It Yourself

Install the Arduino IDE on your computer, add the ESP32 board package, and open the Serial Monitor. Upload the sample code above and watch what appears in the Serial Monitor window.

• What did you see printed in the Serial Monitor?

• How often did the message repeat?

// Every Arduino sketch starts with this skeleton
void setup() {
// Runs ONCE when the board powers on
Serial.begin(115200); // Start communication at 115200 baud
Serial.println("Robot is booting up!");
}
void loop() {
// Runs FOREVER, over and over
Serial.println("I am alive!");
delay(1000);
}

Think About It

🤔 Discuss With a Partner or Write Your Answer

Why do you think setup() only runs once, while loop() runs forever? What kinds of tasks belong in each one?

Quick Recap: Fill In The Blanks

1. An Arduino program is called a __________.

2. The __________() function runs only once, right when the board powers on.

3. The __________() function runs over and over again, forever.

4. The __________ Monitor lets you see messages your board sends back to your computer.

Match It!

Draw a line (or write the matching letter in the blank) to connect each word to its meaning.

Check Your Understanding

  • I can explain what the Arduino IDE is and why programmers use it

  • I can install the Arduino IDE and add ESP32 board support

  • I can identify the main parts of the IDE: Toolbar, Sketch editor, and Serial Monitor

  • I can explain the difference between setup() and loop()

Quiz Time!

Question 1: What is an Arduino program called?

🔍 Reveal answer (drag-select the blank space):

Question 2: Which function runs only ONE time when the board starts?

🔍 Reveal answer (drag-select the blank space):

Question 3: What does the Serial Monitor let you do?

🔍 Reveal answer (drag-select the blank space):

Challenge Zone

🏆 Level Up

Modify the sample code so setup() prints your name and the date you're starting this course, and loop() prints a countdown message that increases in number each second (Hint: you'll need a variable that remembers the count — a preview of Lesson 3!).

Robot Journal

What's one thing you're excited to build once you know how to program your ESP32? Write down your dream robot project idea.

Lesson Wrap-up

🤖 Robo Says

Robo says: "Your control center is ready! Next mission: making me blink my very first light."

Wiring Diagram

Getting Started with the Arduino IDE — wiring diagram

Finished this lesson?

Marks it complete and unlocks the next one.

Lesson list
Lesson 1 of 10