









| Pin Name | Description | Identification Method |
|---|---|---|
| Anode | Positive terminal of the LED | Longer leg of the LED |
| Cathode | Negative terminal of the LED | Shorter leg or flat edge on casing |
Determine the Resistor Value:
Connect the LED:
Power the Circuit:
Below is an example of how to connect and control a Green LED using an Arduino UNO.
// Green LED Blink Example
// This code blinks a green LED connected to pin 9 of the Arduino UNO.
const int ledPin = 9; // Define the pin connected to the LED
void setup() {
pinMode(ledPin, OUTPUT); // Set pin 9 as an output
}
void loop() {
digitalWrite(ledPin, HIGH); // Turn the LED on
delay(1000); // Wait for 1 second
digitalWrite(ledPin, LOW); // Turn the LED off
delay(1000); // Wait for 1 second
}
LED Does Not Light Up:
LED is Dim:
LED Burns Out Quickly:
LED Flickers:
Q: Can I connect a Green LED directly to a 5V power supply?
A: No, you must use a current-limiting resistor to prevent damage to the LED.
Q: What happens if I reverse the polarity of the LED?
A: The LED will not light up. In some cases, prolonged reverse voltage may damage the LED.
Q: Can I use a Green LED with a 3.3V microcontroller?
A: Yes, but ensure the forward voltage of the LED is compatible and use an appropriate resistor.
Q: How do I know the polarity of the LED?
A: The longer leg is the anode (+), and the shorter leg or flat edge on the casing is the cathode (-).