SHIVENDRA VATSA MISHRA
Published

Finding the IR Codes of Any IR Remote Using Arduino

Let's learn to use your IR Receiver to get the codes of any IR based remote like TV remote, AC remote etc. by using Arduino.

IntermediateFull instructions provided2 hours5,821
Finding the IR Codes of Any IR Remote Using Arduino

Things used in this project

Hardware components

DFRobot DFRduino UNO
×1
IR receiver (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
IR Remote
Anyone(TV or AC remote) or the one which you want to use in your project.
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Circuit Diagram

Code

Code for finding the IR codes

C/C++
#include <IRremote.h>      //including infrared remote header file

int RECV_PIN = 11;        // the pin where you connect the output pin of IR sensor 
IRrecv irrecv(RECV_PIN);
decode_results results;
 
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
}
 
void loop() 
{
  if (irrecv.decode(&results)) 
    {
    int value = results.value;
    Serial.println(" ");
    Serial.print("Code: ");
    Serial.println(results.value); //prints the value a a button press
    Serial.println(" ");
    irrecv.resume();              // Receive the next value
    Serial.println("*****************");
      }
}

Credits

SHIVENDRA VATSA MISHRA

SHIVENDRA VATSA MISHRA

5 projects • 17 followers
Parsuing B.Tech from SRM Institute Of Science And Technology in Electrical And Electronics Engineering.
Thanks to Naman Chauhan.

Comments