Hello! I recently purchased some RF433 Transmitter/Reciever pack and was going to start a project I've thought was interesting. I wanted to be able to receive the signal from my gate opener(example) and then replay that signal through the transmitter and receiver.
I've been researching this topic frequently throughout the past few days but keep running into problems. Most sketches use an if statement to see if MySwitch is available, but it is absolutely never available. (This is using RCSwitch). Do you guys know of a way to see if my Transmitter/Reciever(s) are busted? I could have a bad pair but do not know how to check...
Another thing - I know that some signals change each time their remotes are used (certain garage openers and such) but for my gate opener, if I am doing this correctly, should it show me a signal on my Serial output at least?
Here is the sketch I am using.
(This is just the ReceiveDemo_Advanced sketch that comes with the RCSwitch library)
/*
Example for receiving
https://github.com/sui77/rc-switch/
If you want to visualize a telegram copy the raw data and
paste it into http://test.sui.li/oszi/
*/
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on interrupt 0 => that is pin #2
}
void loop() {
if (mySwitch.available()) {
output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
mySwitch.resetAvailable();
}
}```
Thanks!