#include <IRremote.h>

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);

const int RECV_PIN=8;

IRrecv irrecv(RECV_PIN);

decode_results results;



void setup()

{
  lcd.init();
  lcd.backlight();
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  irrecv.blink13(true);
  lcd.print("READY TO DECODE");
}



void loop()

{
  if (IrReceiver.decode())
  {
    Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);

    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("IR DECODED");
    lcd.setCursor(0,1);
    lcd.print(IrReceiver.decodedIRData.decodedRawData, HEX);
    irrecv.resume(); // Receive the next value
    delay(100);
  }
}