#include <IRremote.h>
#include <LiquidCrystal.h>
#define IR_RECEIVE_PIN 8
#define IR_BUTTON_1 48
const int DISPLAYCOLUMN = 16;
const int DISPLAYROW = 2;
const int rs = 12, en = 11, d4 = 4, d5 = 5, d6 = 6, d7 = 7;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup()
{
Serial.begin(9600);
IrReceiver.begin(IR_RECEIVE_PIN);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
}
void loop(){
if (IrReceiver.decode()) {
IrReceiver.resume();
int command = IrReceiver.decodedIRData.command;
switch (command) {
case IR_BUTTON_1:{
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("1");
break; }
default : {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Not recognized");
}
}
}
}