anshulpareek
Published © GPL3+

Remote Controlled Smart Lamp

Control your home appliances through any remote very easily.Even you can use your old remote to control home appliances.

BeginnerFull instructions provided9,371
Remote Controlled Smart Lamp

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Infrared (IR) Proximity / Obstacle Detecting Sensor Module
×1

Story

Read more

Schematics

Full Circuit Diagram

Circuit Diagram

Code

Arduino check Remote Code

Arduino
Check remote codes using this code
/*Created By: Anshul Pareek
*usage : read IR SIGNALS AND PRINT ON SERIAL
*/
#include <boarddefs.h> 
#include <ir_Lego_PF_BitStreamEncoder.h> 
#include <IRremote.h> 
#include <IRremoteInt.h> 
int RECV_PIN = 9; 
IRrecv irrecv(RECV_PIN); 
decode_results results; 
void setup() 
{ 
 
 Serial.begin(9600); 
 irrecv.enableIRIn(); // Start the receiver 
} 
void loop() 
{ 
 if (irrecv.decode(&results)) 
   { 
     
    Serial.println(results.value); 
    
    irrecv.resume(); // Receive the next value 
   } 
   delay(000); 
} 

Arduino Switch light on off

Arduino
Use this code to switch on off the light remember to replace remote button code.
/*Light on off code*/
#include <boarddefs.h> 
#include <ir_Lego_PF_BitStreamEncoder.h> 
#include <IRremote.h> 
#include <IRremoteInt.h> 
int RECV_PIN = 9; 
int OUT_PIN=8;
IRrecv irrecv(RECV_PIN); 
decode_results results; 
void setup() 
{ 
 pinMode(OUT_PIN,OUTPUT); 
 Serial.begin(9600); 
 irrecv.enableIRIn(); // Start the receiver 
} 
void loop() 
{ 
 if (irrecv.decode(&results)) 
   { 
    Serial.println(results.value); 
    if(results.value == 490607474){ //Please replace your remote button code for which you want to on the light
       digitalWrite(OUT_PIN,HIGH); 
       delay(1000); 
     }else{ 
       digitalWrite(OUT_PIN,LOW); 
     } 
     delay(1000); 
    irrecv.resume(); // Receive the next value 
   } 
   
   delay(000); 
} 

Credits

anshulpareek

anshulpareek

14 projects • 93 followers
Working as a IOT And Sr. Software Engineer having interest in developing gadgets for general purpose.

Comments