1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 // Print IR Buttons to Serial Monitor // TheGeekPub.com #include // Define the pin for the IR Receiver const int IR_RECV_PIN = 10; // Create the IR object IRrecv gpirrecv(IR_RECV_PIN); decode_results results; void setup(){ Serial.begin(9600); gpirrecv.enableIRIn(); gpirrecv.blink13(true); Serial.println("READY."); } void loop(){ if (gpirrecv.decode(&results)){ Serial.println(results.value, HEX); gpirrecv.resume(); } }