Hello,
My problem :
I have an arduino with an IR LED receiver that perfectly works with my transmitter, a Logitech Harmony Hub, using IRLib2 library. But due to some environement issues, I had like to use a wire between my Harmony Hub and the Arduino. The Harmony Hub provide a jack 2.5mm mono output to plug an external IR transmitter. Instead of using it with external transmitter, I tried to connect this jack output to the Arduino's pin where my receiving IR LED was connected (data pin). Each time I press a button on my remote, a signal is received by the Arduino, but the code is always UNKNOW. What I'm missing ?
An equivalent simple test case to reproduce :
I tried to write a more simple test to reproduce my problem without the Harmnoy Hub. On my Arduino I have connected a direct wire between pin 2 and 3. And used the following code with IRLib2 :
#include <IRLibAll.h>
IRsend mySender; // Default send on pin 3
IRrecvPCI myReceiver(2); // Listen on pin 2
IRdecode myDecoder;
void setup() {
Serial.begin(9600);
delay(2000); while (!Serial); //delay for Leonardo
myReceiver.enableIRIn(); // Start the receiver
Serial.println(F("Ready to receive IR signals"));
}
void loop() {
delay(5000);
mySender.send(SONY,0xa8bca, 20);
myReceiver.enableIRIn(); // Re-enable receiver
if (myReceiver.getResults()) {
myDecoder.decode(); //Decode it
myDecoder.dumpResults(true); //Now print results. Use false for less detail
myReceiver.enableIRIn(); //Restart receiver
}
}
Every 5 seconds I receive an UNKOWN code, so I get the behavior than with the Harmoy Hub. Am I missing an electronic component between pin 2 and 3 ?
Get IRLib2 => GitHub - cyborg5/IRLib2: Library for receiving, decoding, and sending infrared signals using Arduino