← Introduction to Robotics: Build, Code, Create
Free lesson

Your First Circuit: Lighting an LED

From Ideas to a Real, Working Circuit

You now know what a microcontroller is, the basics of voltage and current, and how a breadboard connects components. It's time to put all three together into your very first real circuit: making an LED light up, controlled by an Arduino.

The Parts You Need

  • An Arduino (or Arduino-compatible board)
  • A breadboard
  • An LED (light-emitting diode)
  • A resistor (usually around 220 ohms for a basic LED)
  • Two jumper wires

Why the Resistor Matters

This is important: never connect an LED directly to a power source without a resistor. An LED has very little natural resistance to electrical current, so without a resistor to limit the flow, too much current rushes through and instantly burns out the LED (sometimes within a fraction of a second). The resistor's whole job is to protect the LED by limiting how much current reaches it — a small, cheap, essential safety component.

LEDs Only Work One Way

An LED is polarized — meaning it only lets current flow in ONE direction, unlike a simple wire. LEDs have one longer leg (the positive side, called the anode) and one shorter leg (the negative side, called the cathode). Connect it backward, and it simply won't light up (this is actually a very safe failure — a backward LED doesn't usually damage anything, it just stays dark, which makes it a forgiving component to learn on).

The Circuit, Step by Step

  1. Place the LED on the breadboard, with its two legs in two DIFFERENT rows (remember from the last lesson: rows are connected internally).
  2. Connect a resistor from the LED's positive leg's row to an empty row.
  3. Run a jumper wire from that row to one of the Arduino's digital pins (for example, pin 13).
  4. Run a jumper wire from the LED's negative leg's row to the Arduino's GND (ground) pin.
  5. With a simple program telling that digital pin to go HIGH (turn on) and LOW (turn off), the LED lights up and switches off exactly as instructed.

What Just Happened, in Sense-Think-Act Terms

This simple circuit doesn't have a "sense" step yet — it's pure "think" (the Arduino's program) and "act" (the LED lighting up). In upcoming modules, you'll add a sensor to this same basic setup, completing the full sense-think-act loop for the first time in a real, physical circuit.

Key Takeaway

Every concept from this entire module — the microcontroller, voltage and current, and breadboard connections — comes together in this one simple circuit. If you can build and understand this, you have the real foundation for every more complex circuit in this course.

Enjoying it?

Sign up free to carry on with the course, with an AI tutor to help you.

Continue the course