#include <IRremote.h>
int signal=10;
int value;
void setup() {
Serial.begin(9600);
IrReceiver.begin(signal);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if(IrReceiver.decode())
{
Serial.println(IrReceiver.decodedIRData.command);
value = IrReceiver.decodedIRData.command;
switch(value)
{
case 48:
Serial.println("pressed on 1");
break;
case 24:
Serial.println("pressed on 2");
break;
case 122:
Serial.println("pressed on 3");
break;
case 162:
Serial.println("power");
break;
default:
Serial.println("pressed another num");
}
IrReceiver.resume();
}
}