Guys, can anyone resolve this conflict? I had the idea of using a 433 Mhz garage key fob to make some commands on a P10 led panel.
If I comment dmd.begin() then the remote control key works fine at more than 5 meters. But with dmd.begin() active, the remote control only works if you are 1 meter at most from the receiver, which is an SRX882.
I put a buzzer just to monitor the arrival of the keyring code (final 869).
#include <RCSwitch.h>
#include <Arduino.h>
#include <SPI.h>
#include <DMD2.h>
RCSwitch mySwitch = RCSwitch();
SPIDMD dmd(1,1);
const int buzzer = 3; // OUTPUT
void setup() {
dmd.begin();
pinMode(buzzer, OUTPUT);
Serial.begin(115200);
mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin #2
}
void loop() {
if (mySwitch.available()) {
int value = mySwitch.getReceivedValue();
if (value == 0) {
Serial.print("Unknown encoding");
} else {
Serial.print("Received ");
Serial.print( mySwitch.getReceivedValue() );
Serial.print(" / ");
Serial.print( mySwitch.getReceivedBitlength() );
Serial.print("bit ");
Serial.print("Protocol: ");
Serial.println( mySwitch.getReceivedProtocol() );
}
if(mySwitch.getReceivedValue() == 140160869) {
tone(buzzer,440,300);delay(200);tone(buzzer,700,200);
}
mySwitch.resetAvailable();
}
}