#include <IRremote.h>
#include <LiquidCrystal.h>
#define PIN_RECEIVER 2
IRrecv receiver(PIN_RECEIVER);
LiquidCrystal lcd(12, 11, 10, 9, 8, 7);
decode_results results;
void setup()
{
Serial.begin(115200);
lcd.begin(16, 2);
lcd.print("<press a button>");
receiver.enableIRIn(); // Start the receiver
pinMode (4,OUTPUT);
digitalWrite(4,HIGH);
//pinMode(7,OUTPUT);digitalWrite(7,LOW);
//pinMode(6,OUTPUT);digitalWrite(6,HIGH);
}
void loop() {
if (receiver.decode(&results)) {
Serial.println(results.value, HEX);
receiver.resume(); // Receive the next value
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("<press a button>");
lcd.setCursor(3, 1);
lcd.print(results.value, HEX);
}
delay(500);
}