ENERGEN
Published

IR Receiver & Relay module with Arduino UNO

Simple Home automation using Arduino UNO

IntermediateFull instructions provided2,511
IR Receiver & Relay module with Arduino UNO

Things used in this project

Story

Read more

Schematics

Schematics

Code

Arduino code

Arduino
you can use this code
#include <IRremote.h>;

IRrecv energen(11);
decode_results results;



void setup() {
  // put your setup code here, to run once:
 pinMode(4,OUTPUT);
 Serial.begin(9600);
energen.enableIRIn();
}

void loop() {
  // put your main code here, to run repeatedly:
if(energen.decode(&results)){
  Serial.println(results.value,DEC);
  energen.resume();
}
delay(100);
long val = results.value;
if(val==16236607){
  digitalWrite(4,HIGH);
}
if(val==16203967){
  digitalWrite(4,LOW);
}
}

Credits

ENERGEN
17 projects • 10 followers
Youtube creator
Contact

Comments

Please log in or sign up to comment.