OK, so this project is basically about controlling devices directly connected to the AC main power supply (please exercise caution!!). So here I have controlled my study lamp using a relay and the Arduino. It’s one step closer to a Home Automation system!!
Hello everyone!! Welcome to this post on Arduino Projects!!
Need a short introduction to what the Arduino is then click on LINK
View more thrilling projects HERE
Demo:
Things Required:
- Jumper Wires
- Arduino UNO
- Relay
- Lamp that is powered through your House AC supply
- USB Cable
- Arduino IDE on computer
Reference Material:
- What is a Relay- A relay is an electrically operated switch. Learn more about the workings of a relay HERE.
- You can refer to this video for the project.
Code:
View on/ Download from Github: (LINK)
int relay=7;
void setup() {
pinMode(relay, OUTPUT);
}
void loop() {
digitalWrite(relay, HIGH);
delay(3000);
digitalWrite(relay, LOW);
delay(5000);
}
Stay Tuned for upcoming posts on Arduino Projects! Want to be the first to know when a new and amazing post comes up?? Then feel free to subscribe!
Happy Learning!!
