Electro BOY
Published © GPL3+

IR Remote Decoder using Arduino Nano

A small decoder which can decode the NEC protocol signals from your TV remote in Hexadecimal form. A small project with proper library/ code

BeginnerFull instructions provided1 hour3,914
IR Remote Decoder using Arduino Nano

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1

Software apps and online services

Arduino IDE
Arduino IDE
EasyEDA
JLCPCB EasyEDA

Story

Read more

Custom parts and enclosures

IR LIbrary

PCB Shield Gerber

Schematics

Circuit diagram

Code

Code for decoder

Arduino
/* hello guys here I am using older versions on Ir library so please download and install all the previous version 
 *  the link to download preferred library is: 
 *  This code is made by Sagar saini/ Youtube: sagar networks
 *  Any questions or queries DM me on instagram Saini_sagar_7294.
 *  Explore my website for more interesting projects: www.circuitkicker.com
 */


#include <IRremote.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
 
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET 1
Adafruit_SSD1306 display(128, 64, &Wire, OLED_RESET);

const int RECV_PIN=10;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  irrecv.blink13(true);  // Led will blink on receiving each signal
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // try 0x3D also if OLED is not working
  display.clearDisplay();
}

void loop() {
 if (IrReceiver.decode()) 
  {
    Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);  // decoding method accoriding to the new libraries
    display.clearDisplay();
    display.setTextSize(2);  // Set the text size
    display.setTextColor(WHITE);
    display.setCursor(1,10);
    display.print("IR DECODER");
    display.setCursor(10,40);
    display.print(IrReceiver.decodedIRData.decodedRawData, HEX);
    display.display();
    irrecv.resume(); // Receive the next value
    delay(500);
 }
}

Credits

Electro BOY

Electro BOY

57 projects • 52 followers
Electronics is my passion. I am not professional, Always learning something new. I am good at soldering, designing pcb, Arduino programing.

Comments