LED 5mm EN: 두 판 사이의 차이
(Created page with "{{#seo:|title=아두위키 : 아두이노 LED 가이드|title_mode=append|keywords=아두이노, 정보과학, 메이커학습, 수행평가, LED, 아두이노 작품, 캡스톤작품, 아두이노 예제코드|description=아두이노로 LED를 제어하는 방법(기본정보, 회로, 예제 코드)를 소개합니다. 정보과학과 메이커수업에 활용가능합니다.}} center|class=coders100 Apply a constant voltage to emit l...") |
잔글편집 요약 없음 |
||
| 1번째 줄: | 1번째 줄: | ||
{{#seo:|title= | {{#seo:|title=ArduWiki: Arduino LED Guide|title_mode=append|keywords=Arduino, Information Science, Maker Learning, Performance Evaluation, LED, Arduino Projects, Capstone Projects, Arduino Example Code|description=Introduces how to control LEDs with Arduino (basic information, circuit, example code). Can be used in Information Science and Maker classes.}} | ||
[[File:5mmled대표이미지.jpg|center|class=coders100]] | [[File:5mmled대표이미지.jpg|center|class=coders100]] | ||
Apply a constant voltage to emit light. | Apply a constant voltage to emit light. | ||
2025년 3월 20일 (목) 20:03 판

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
