Lesson 3
20 min
Breadboard, resistor, LED, button and multimeter: discover and use the components.
Definition
An electronic component is a basic element of a circuit that plays a specific role: connecting, limiting current, producing light, controlling or measuring. By assembling a few simple components (breadboard, resistor, LED, push button) and connecting them with wires, you build a circuit that the Arduino board can power and control.
In this lesson, you get to know the components you will meet in almost every project in the course. For each one, remember three things: what it is used for, whether it has a connection direction, and what precaution to take. Now is the time to take out your kit and handle each part as you go.
The breadboard lets you build circuits without soldering: you simply push components and wires into its holes. Under the board, metal strips connect certain holes to each other, which creates the connections.
5V and GND.In practice, if you push an LED leg and one end of a resistor into two holes of the same column, they are automatically connected. If they are in two different columns, there is no contact, unless you add a wire. The center groove, for its part, is used to straddle integrated circuits without connecting their two rows of pins.

Jumper wires connect the different points of the circuit. To keep track of everything, adopt a simple habit: always use a red wire for positive (5V) and a black wire for ground (GND), and other colors for signals. A well color-coded circuit is much easier to check.
The resistor limits the current flowing through a circuit. It has no connection direction. Its value is read from colored bands: each color corresponds to a digit. The values used most in this course are 220 ohms (red, red, brown) and 10 kΩ (brown, black, orange).
Here is how to read the bands: the first two give the digits, the third indicates the number of zeros to add (the multiplier), and the last one, set slightly apart, gives the tolerance. For a "brown, black, orange" resistor: brown is 1, black is 0, orange means "times one thousand". You get 10 × 1,000 = 10,000 ohms, or 10 kΩ.

An LED (light-emitting diode) lights up when current flows through it. Unlike the resistor, it has a direction: theanode (+, the longer leg) connects to the positive side, and the cathode (−, the shorter leg, on the flat-edge side) connects to the GND side.
An LED is a diode: it only lets current through in one direction. If you connect it backwards, it won't light up, but it is usually not damaged: just flip it around. It comes in many colors, and each color requires a different voltage across its terminals (about 2 V for red, 3 V or more for blue and white).
Always use a resistor with an LED
An LED has almost no internal resistance: connected directly to 5 V, it lets an excessive current through and burns out within moments. Always place a resistor in series with it.

A red LED uses about 2 V across its terminals for a current of about 20 mA. With a 5 V supply, the resistor must "absorb" the remaining 3 V. We apply Ohm's law:
Voltage across the resistor = 5 V − 2 V = 3 V
Desired current = 20 mA = 0.02 A
R = U / I = 3 / 0.02 = 150 ohms
150 Ω is a standard value, but it gives exactly 20 mA,
the LED's limit. We choose the next standard value up: 220 Ω
(the LED will be slightly dimmer, but protected)Why choose the higher value rather than the lower one? Because a smaller resistor would let more current through than planned, and could damage the LED. With 220 ohms, the current drops to about 14 mA: the LED still shines very well, and it lasts longer.
The method comes down to three steps: subtract the LED's voltage from the supply voltage, divide the result by the desired current, then round up to the next standard value.
A push button works like a temporary switch: it closes the circuit for as long as you press it. Models with 4 legs have the legs connected in pairs; pressing connects the two pairs together.
To avoid wiring mistakes, place the button on the breadboard so that itstraddles the center groove: that way, the two sides of the button end up in different columns, and pressing it creates the intended connection. In an upcoming lesson, you will see how the Arduino board reads the state of this button.
The multimeter is the electronics technician's measuring tool. It can measure a voltage (in volts), a resistance (in ohms), or check the continuity of a wire. It is an excellent ally for understanding why a circuit doesn't work.

To put all of this together, here is the simplest circuit: an LED powered by the board. Connect the 5V pin to a 220-ohm resistor, the resistor to the LED's anode, and the cathode toGND. The circuit is then closed, current flows, and the LED lights up. There is no program yet: the board is only used as a power source.
+, cathode −) and requires a series resistor.R = (5 − LED voltage) / current, then round up.Exercise