LED 5mm EN: 두 판 사이의 차이
잔글편집 요약 없음 |
잔글 (ArduWiki님이 LED 5mm 문서를 넘겨주기를 만들지 않고 LED 5mm EN 문서로 이동했습니다: 철자가 잘못된 제목) |
(차이 없음)
| |
2025년 3월 20일 (목) 20:04 기준 최신판

Apply a constant voltage to emit light.
The longer leg is the positive (+) terminal and the shorter one is the negative (-) terminal, so caution is needed when connecting.
Be careful not to supply a voltage higher than the maximum voltage of the product.
Specifications
These are the specifications of the LED discussed in the text. Specifications may vary slightly depending on the manufacturer and model.
| Color | Minimum Voltage[V] | Maximum Voltage[V] | Standard Current[mA] | Maximum Current[mA] |
| Red | 1.8 | 2.3 | 20 | 50 |
| Yellow | 2 | 2.8 | ||
| Green | 3 | 3.6 | ||
| Blue | 3.4 | 3.8 | ||
| White | 3.4 | 4 |
Required Hardware
- LED
- Arduino board
- Jumper cables
Connection
Connect the longer leg through a resistor to a digital pin, and the shorter leg to the Arduino's GND.
You can connect the long legs together to operate from a single digital pin as shown below, or set different digital pins for each LED if you want them to operate separately.
| Component | Connection to Arduino | Notes |
| LED(+) | Connected to Resistor | Resistor limits current to Protect LED |
| Resistor | Connected to D7 Pin | Recommended to use a resistor between 220Ω and 330Ω |
| LED(-) | Connected to GND |

Example Code
#define led 7 // Use pin 7
#define dly 1000
void setup() {
pinMode(led, OUTPUT);
}
void loop() { // Code for turning on the LED for 1 second intervals
digitalWrite(led, HIGH);
delay(dly);
digitalWrite(led, LOW);
delay(dly);
}
Execution Result
