Skip to content

Commit d11cee1

Browse files
Add information on resistor
1 parent 776f29f commit d11cee1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/built-in-examples/01.basics/Blink/Blink.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ This example uses the built-in LED that most Arduino boards have. This LED is co
5959

6060
If you want to light an external LED with this sketch, you need to build this circuit, where you connect one end of the resistor to the digital pin correspondent to the *LED_BUILTIN* constant. Connect the long leg of the LED (the positive leg, called the anode) to the other end of the resistor. Connect the short leg of the LED (the negative leg, called the cathode) to the GND. In the diagram below we show an UNO board that has D13 as the LED_BUILTIN value.
6161

62-
The value of the resistor in series with the LED may be of a different value than 220 ohms; the LED will light up also with values up to 1K ohm.
62+
The resistor is essencial for safe operation as it limits the current flowing through the LED, preventing damage to both the LED and the Arduino's output pin. You can choose the resistor value based on the desired current using Ohm's Law (V = IR) where V is the voltage of your board (5V or 3.3V) minus the forward voltage for the LED you are using (typical for red would be 1.8 to 2.2 volts). In this case, using a 220-ohm resistor with an Arduino UNO R3 (a 5V board) limits the current to a safe level for both the LED and the Arduino pin. Adjusting the resistor value allows you to control the LED's brightness while ensuring safe operation. For 5V boards you can expect the LED to be visible to a resistor value of up to 1K Ohm.
6363

6464
![](assets/circuit.png)
6565

0 commit comments

Comments
 (0)