#include <Arduino.h>
#include <IRremote.h>
#define IR_RECEIVE_PIN 6
#define IR_SENDER_PIN 3
void setup() {
Serial.begin(9600);
IrReceiver.begin(IR_RECEIVE_PIN);
IrSender.begin(IR_SENDER_PIN);
}
void loop() {
IrSender.sendSamsung(0x7, 0x7, 0);
delay(5000);
if (IrReceiver.decode()) {
auto &data = IrReceiver.decodedIRData;
if (data.protocol != UNKNOWN && data.numberOfBits >= 8) {
IrReceiver.printIRResultShort(&Serial);
Serial.println("RawData HEX");
Serial.println(data.decodedRawData, HEX);
delay(2000);
}
IrReceiver.resume();
}
}
I try to send a signal from an IR led to a receiver on the same arduino. Does this work? What do I have to change? At the moment I dont jump into the IrReceiver.decode() section.