Control LED Using IR Remote : Simple : 5 Steps - Instructables
Maybe your like
Introduction: Control LED Using IR Remote : Simple
By Anshu ARFollowMore by the author:


Hello everyone, In this Instructables, we will control LED using IR remote.
Step 1: Gather the Parts
- A breadboard
- A LED
- A 220ohm resistor
- An Arduino UNO
- A TSOP382 IR receiver
- Some jumper or hookup wires
Step 2: Wiring
Hookup all the components according to the circuit diagram shown above.
Step 3: Receive the IR Signals From the Remote
Download Ken Shirriffs IR library from Github then add the library to "Arduino installation location\libraries\"
Upload the following code to your Arduino:
#include <IRremote.h> int IR_Recv = 2; //IR Receiver Pin 2 IRrecv irrecv(IR_Recv); decode_results results; void setup(){ pinMode(13, OUTPUT); Serial.begin(9600); //starts serial communication irrecv.enableIRIn(); // Starts the receiver } void loop(){ if (irrecv.decode(&results)) { long int decCode = results.value; Serial.println(decCode); irrecv.resume(); } }Then open the serial monitor on your Arduino IDE and receive IR decimal signals by pressing buttons on your remote for this project we'll need two IR decimal signals.For me, the IR decimal values are "3733801123" and "403429887" for Select and Power button respectively.
Step 4: The Final Code
Upload the following code to your Arduino after replacing 3733801123 and 403429887 with your IR remote decimal code:
#include <IRremote.h> int IR_Recv = 2; //IR Receiver Pin 2 IRrecv irrecv(IR_Recv); decode_results results; void setup(){ pinMode(13, OUTPUT); Serial.begin(9600); //starts serial communication irrecv.enableIRIn(); // Starts the receiver } void loop(){ if (irrecv.decode(&results)){ long int decCode = results.value; Serial.println(decCode); if (results.value == 3733801123) //Select button { digitalWrite(13, HIGH); Serial.println("LED turned ON"); } if (results.value == 403429887) //Power button { digitalWrite(13, LOW); Serial.println("LED turned OFF"); } irrecv.resume(); } }Step 5: Done
Now just press the button of the remote whose code you assigned to your Arduino to see your LED turning on and off.
Thanks for viewing.
Please write your questions or suggestions below.
Tag » Arduino Ir Remote Led On Off
-
Turn LEDs On/Off Via Remote Control - Arduino Project Hub
-
Control An LED With The Remote Control - Arduino Project Hub
-
Using An IR Remote With LEDs - Arduino Project Hub
-
Arduino IR Remote To Control LEDs ON And OFF - ElectroSchematics
-
Arduino - Control LED's With IR Remote Control
-
ARDUINO: IR REMOTE CONTROL OF LEDS - YouTube
-
Control LEDs Using IR Remote And Arduino - Microcontrollers Lab
-
Control-LEDs-ON-OFF-with-IR-Remote-and-Arduino - GitHub
-
How To Control LEDs With An Arduino, IR Sensor, And Remote
-
Turn Led ON/OFF With Any Remote Control | By Julien Louage - Medium
-
How To Set Up An IR Remote And Receiver On An Arduino
-
Arduino IR Remote Controller Tutorial - Setup And Map Buttons
-
IR Remote Controlled LED Chaser Using Arduino - Engineers Garage
-
Control A Led Using Infrared Sensor And Give Command By IR ...