The Green Light Emitting Diode (LED) for 220VAC is an electronic component designed to emit green light when connected to a 220 volts alternating current (AC) supply. This LED is typically used as an indicator light in various electrical applications such as power strips, appliances, control panels, and other devices where visual confirmation of operation is necessary.
Pin Number | Description |
---|---|
1 | Anode (AC Live) |
2 | Cathode (AC Neutral) |
// Note: Direct connection of a 220VAC LED to an Arduino is not recommended
// and can be dangerous. This example assumes the use of a low-voltage LED
// with a relay module to control a 220VAC circuit.
#include <Arduino.h>
const int relayPin = 2; // Relay control connected to digital pin 2
void setup() {
pinMode(relayPin, OUTPUT); // Initialize the relay pin as an output
}
void loop() {
digitalWrite(relayPin, HIGH); // Turn on the relay (LED ON)
delay(1000); // Wait for 1 second
digitalWrite(relayPin, LOW); // Turn off the relay (LED OFF)
delay(1000); // Wait for 1 second
}
Note: The above code is for illustrative purposes only. A relay module rated for 220VAC should be used to control the high-voltage LED, and the Arduino can only be used to control the relay, not the LED directly. Always consult a professional electrician when dealing with high-voltage circuits.