Naman Chauhan
Published © GPL3+

Finding the IR Codes of Any IR Remote Using Arduino

We make several projects on various platforms and we always need the codes of any appliance, console, etc just by using an Arduino.

BeginnerProtip30 minutes72,630
Finding the IR Codes of Any IR Remote Using Arduino

Things used in this project

Hardware components

UTSOURCE Arduino UNO
×1
UTSOURCE IR Receiver
×1
IR Remote
Anyone or the one which you want to use in your project.
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

capture_CQhcYyINfc.PNG

Code

Finding IR Remote Codes

C/C++
/*
 * https://github.com/chauhannaman98
 *
 * sketch.ino
 *
 * July 25, 2018 © GPL3+
 * Author : Naman Chauhan
 */

#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("*****************");
    }
}

Finding IR Remote Codes

Credits

Naman Chauhan

Naman Chauhan

41 projects • 129 followers
Programmer, electronic adept masquerading as Computer Science student. Email for Cooperation/Sponsorships to chauhannaman98@gmail.com

Comments