#include #define BUTTON_PIN_1 2 // Power #define BUTTON_PIN_2 4 // Vol Up #define BUTTON_PIN_3 5 // Vol Down #define BUTTON_PIN_4 6 // DasErste #define BUTTON_PIN_5 7 // ZDF #define BUTTON_PIN_6 8 // BR IRsend irsend(3); void setup() { pinMode(BUTTON_PIN_1, INPUT_PULLUP); pinMode(BUTTON_PIN_2, INPUT_PULLUP); pinMode(BUTTON_PIN_3, INPUT_PULLUP); pinMode(BUTTON_PIN_4, INPUT_PULLUP); pinMode(BUTTON_PIN_5, INPUT_PULLUP); pinMode(BUTTON_PIN_6, INPUT_PULLUP); } void loop() { if (digitalRead(BUTTON_PIN_1) == LOW) { irsend.sendNEC(0x4, 0x8, 0); // Power delay(500); } if (digitalRead(BUTTON_PIN_2) == LOW) { irsend.sendNEC(0x4, 0x2, 0); // Vol Up delay(500); } if (digitalRead(BUTTON_PIN_3) == LOW) { irsend.sendNEC(0x4, 0x3, 0); // Vol Down delay(500); } if (digitalRead(BUTTON_PIN_4) == LOW) { irsend.sendRC5(0xA, 0x1, 0); // DasErste delay(500); } if (digitalRead(BUTTON_PIN_5) == LOW) { irsend.sendRC5(0xA, 0x2, 0); // ZDF delay(500); } if (digitalRead(BUTTON_PIN_6) == LOW) { irsend.sendRC5(0xA, 0x3, 0); // BR delay(500); } } // INFO: // Der Sketch verwendet 4098 Bytes (12%) des Programmspeicherplatzes. Das Maximum sind 32256 Bytes. // Globale Variablen verwenden 501 Bytes (24%) des dynamischen Speichers, 1547 Bytes für lokale Variablen verbleiben. Das Maximum sind 2048 Bytes.