#include #define RECEIVER_PIN D10 void setup() { Serial.begin(9600); IrReceiver.begin(RECEIVER_PIN, ENABLE_LED_FEEDBACK); // Start the receiver } void loop() { if (IrReceiver.decode()) { if (IrReceiver.decodedIRData.address == 0x4) { switch (IrReceiver.decodedIRData.command) { case 0x72: Serial.println("RED button pressed."); break; case 0x71: Serial.println("GREEN button pressed."); break; case 0x63: Serial.println("YELLOW button pressed."); break; case 0x61: Serial.println("BLUE button pressed."); break; default: Serial.println("Other button pressed."); break; } } IrReceiver.resume(); // Enable receiving of the next value } }