close-circle
Close
0%
0%

home automation version 1.0

control home appliances with TV remote

Similar projects worth following
  • Description
  • Details
  • Files 0
  • Components 0
  • Logs 0
  • Instructions 0
  • Discussion 0
control ur home lighting , fan and AC with Tv or any ir remote using arduino

Main component
1.arduino
2.relay
3.lm358
4.preset
5.photodiode
6.resistors
7.led
8.bc 548
9.diod
10.general purpose board
11.9v battery
12.any ir remote




CODE
/*created by shanu singh
shanu12.kumar@gmail.com
turn on a LED when the button is pressed and let it on
until the button is pressed again
*/
int pinButton = 8;
int LED = 13;
int stateLED = LOW;
int stateButton;
int previous = LOW;
long time = 0;
long debounce = 200;

void setup() {
pinMode(pinButton, INPUT);
pinMode(LED, OUTPUT);
}

void loop() {
stateButton = digitalRead(pinButton);
if(stateButton == HIGH && previous == LOW && millis() - time > debounce) {
if(stateLED == HIGH){
stateLED = LOW;
} else {
stateLED = HIGH;
}
time = millis();
}
digitalWrite(LED, stateLED);
prev

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates