I am making an art project which involves reverse engineering of a Panasonic projector IR Remote and sending the decoded signal back to the projector.
I made a simple decoder and I use IR.Remote Recieve Demo for it.
It works well with NEC remotes and any other remote I could get my hands on but the Panasonic remote, code for which I so desperately need because the deadline is near, makes the sketch behave weird - it tends to return the same result for any button pressed (and that result once sent to the projector does nothing) and also makes the reciever sketch go into the endless loop of returning that same result over and over again every fraction of a second until the Arduino is turned off. And it happens after pressing any Panasonic remote button only once. No other remote does that to it. I tried to recieve and send raw data, change pins, etc. to no avail. But as it is the only projector I can use for many reasons I need to solve this ASAP.
The code I use is from IRRemote library (v.2.8) examples called IRrecieveDemo
введите или вставьте/*
* IRremote: IRreceiveDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Initially coded 2009 Ken Shirriff http://www.righto.com/
*/
#include <IRremote.h>
#if defined(ESP32)
int IR_RECEIVE_PIN = 15;
#elif defined(ARDUINO_AVR_PROMICRO)
int IR_RECEIVE_PIN = 10;
#else
int IR_RECEIVE_PIN = 11;
#endif
IRrecv IrReceiver(IR_RECEIVE_PIN);
// On the Zero and others we switch explicitly to SerialUSB
#if defined(ARDUINO_ARCH_SAMD)
#define Serial SerialUSB
#endif
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
#if defined(__AVR_ATmega32U4__) || defined(SERIAL_USB) || defined(SERIAL_PORT_USBVIRTUAL)
delay(2000); // To be able to connect Serial monitor after reset and before first printout
#endif
// Just to know which program is running on my Arduino
Serial.println(F("START " __FILE__ " from " __DATE__));
// In case the interrupt driver crashes on setup, give a clue
// to the user what's going on.
Serial.println("Enabling IRin");
IrReceiver.enableIRIn(); // Start the receiver
IrReceiver.blink13(true); // Enable feedback LED
Serial.print(F("Ready to receive IR signals at pin "));
Serial.println(IR_RECEIVE_PIN);
}
void loop() {
if (IrReceiver.decode()) {
IrReceiver.printResultShort(&Serial);
Serial.println();
IrReceiver.resume(); // Receive the next value
}
delay(100);
}