Skip to content

Commit

Permalink
Merge pull request #2175 from arduino/Pedromsousalima/tutorials/Blink…
Browse files Browse the repository at this point in the history
…AddResistor

[MKC-1835] Add information on resistor
  • Loading branch information
pedromsousalima authored Sep 24, 2024
2 parents 0643e5d + 0e5456c commit 7a19d2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/built-in-examples/01.basics/Blink/Blink.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ This example uses the built-in LED that most Arduino boards have. This LED is co

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.

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.
The resistor is essential 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.

![](assets/circuit.png)

Expand Down

0 comments on commit 7a19d2a

Please sign in to comment.