#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0X27, 16, 2);
#include <IRremote.h>
IRrecv remote(6);
#define B 5
#define R 4
#define G 3
int code;
void setup()
{
lcd.init();
lcd.backlight();
lcd.setCursor(1, 0);
Serial.begin(9600);
remote.enableIRIn();
pinMode(G, OUTPUT);
pinMode(B, OUTPUT);
pinMode(R, OUTPUT);
}
void loop()
{
if (remote.decode())
{
lcd.clear();
code = remote.decodedIRData.command;
lcd.print("irCode: ");
lcd.print(code);
if (code == 162)
digitalWrite(B, 1);
if (code == 104)
digitalWrite(B, 0);
if (code == 48)
digitalWrite(R, 1);
if (code == 226)
digitalWrite(G, 1);
if (code == 24)
digitalWrite(G, 0);
if (code == 122)
digitalWrite(R, 0);
remote.resume();
}
}