🔌

Arduino Beginner

Meet the Uno R3 and the breadboard. Light LEDs, size a resistor with Ohm’s law, and read a push-button — building real circuits in the simulator.

4 lessons 8 tasks
Lessons Arduino Lab Quiz Certificate

📚 Lessons

1 The Uno R3 and the breadboard

The Arduino Uno R3 is a microcontroller board. You write a sketch (a C/C++ program), upload it, and the board drives its pins HIGH (≈5 V) or LOW (0 V) to control electronics.

  • Digital pins 0–13 — on/off output or input. Pins marked ~ (3, 5, 6, 9, 10, 11) also do PWM.
  • Analog pins A0–A5 — read a voltage as a number 0–1023.
  • 5V and GND — power. Every circuit needs a complete loop from a source, through components, back to GND.

A breadboard lets you connect parts without soldering: the long side rails carry + (5 V) and (GND), and each short row of 5 holes is electrically joined.

2 Blink: your first LED (and why the resistor)

An LED only allows current one way: the long leg is the anode (+), the short leg the cathode (–). Connect it backwards and it stays dark.

An LED with no resistor draws too much current and burns out. Ohm’s law sets the resistor: with a 5 V pin, a ~2 V LED and ~15 mA target, R = (5−2)/0.015 ≈ 200 Ω, so we use a standard 220 Ω.

We drive pin 13 because the Uno also has a built-in LED on it. Path: pin 13 → 220 Ω → LED anode → LED cathode → GND.

void setup() {
  pinMode(13, OUTPUT);      // pin 13 drives the LED
}

void loop() {
  digitalWrite(13, HIGH);   // LED on (~5V)
  delay(1000);              // wait 1 second
  digitalWrite(13, LOW);    // LED off (0V)
  delay(1000);
}

3 Several outputs in sequence

Each output pin is independent. Give every LED its own resistor and a shared GND. Here three LEDs on pins 8, 9 and 10 light in turn — a simple chase.

pinMode(pin, OUTPUT) configures a pin once in setup(); digitalWrite(pin, HIGH/LOW) switches it; delay(ms) pauses.

int leds[] = {8, 9, 10};

void setup() {
  for (int i = 0; i < 3; i++) pinMode(leds[i], OUTPUT);
}

void loop() {
  for (int i = 0; i < 3; i++) {
    digitalWrite(leds[i], HIGH);
    delay(200);
    digitalWrite(leds[i], LOW);
  }
}

4 Reading a push-button

A digital input reads a pin’s voltage. A floating pin is unreliable, so we use the chip’s internal pull-up with pinMode(2, INPUT_PULLUP): the pin idles HIGH, and the button connects it to GND, so a press reads LOW.

This is why the button goes between pin 2 and GND — no extra resistor needed. The sketch lights the LED while the button is held.

void setup() {
  pinMode(2, INPUT_PULLUP);  // idles HIGH, pressed = LOW
  pinMode(13, OUTPUT);
}

void loop() {
  if (digitalRead(2) == LOW) digitalWrite(13, HIGH);
  else                      digitalWrite(13, LOW);
}

🔌 Arduino Lab — simulated Uno R3

Build the circuit (connect each lead to the correct port), then write a sketch, press Upload & Run, and watch the simulated board react — LEDs glow, motors spin, the serial monitor prints. Pass every challenge to earn your certificate.

Wire the LED to the board, then program it. The LED’s anode goes through the 220 Ω resistor to a digital pin; its cathode returns to GND.

📝 Tasks

8 tasks across 3 pages — multiple-choice and fill-in (type the answer). Score 70% or higher to earn your certificate.

🎓 Certificate of Completion

🔒 Pass the quiz above (70%+) to unlock your downloadable certificate.