Arduino: Project 28: Controlling my study lamp through relay module

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:

  1. Jumper Wires
  2. Arduino UNO
  3. Relay
  4. Lamp that is powered through your House AC supply
  5. USB Cable
  6. Arduino IDE on computer

Reference Material:

  1. What is a Relay- A relay is an electrically operated switch. Learn more about the workings of a relay HERE.
  2. 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!!

This image has an empty alt attribute; its file name is stay-tuned.gif

Leave a Reply

PHP JS HTML CSS BASH PYTHON CODE

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: