#include <IRremote.h>
int IRpin= 9;
IRrecv IR (IRpin);
decode_results cmd; // decode results (signals) to so-called cmd
void setup() {
// put your setup code here, to run once:
Serial.begin (9600);
IR.enableIRIn (); // .enableIRIn = .begin
}
void loop() {
// put your main code here, to run repeatedly:
while (IR.decode (&cmd) == 0){ // while no signals are sent to (&)cmd
}
Serial.println (cmd.value, HEX);
if (cmd.value== 0xFF6897){
Serial.println ("You pushed zero");
}
IR.resume();
}