-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codes decoded with ReceiveDemo_Advanced seem to be incomplete and do not work when used for sending #510
Comments
The example ReceiveDemo_Simple.ino doesn't work for me and I have the same module. What did you do to make it work? |
I just uploaded it to my Arduino Uno. Make sure to connect the receiver's data pin (one of the two pins in the middle, I think it does not matter which of em) to pin 2 of the Arduino. Maybe check the wiki. Maybe your remote is not known to the library. Then you can try to add it (see here and there). |
It appears that the decoding of the original rcswitch library did not work propperly in my case. However ProtocolAnalyzeDemo.ino from Martin-Laclaustra's fork protocollessreceiver branch did the trick for me. It showed me that it was actually 24bit and Protocol 4 instead of 32bit and Protocol 2. The codes themselves were also different.
I learned that some remotes cycle through codes. In my case they would repeat after four subsequent button presses. They are organized in pairs (an on code and an off code). It seems to be important to use the corresponding codes from one of the four pairs. While recording I just pressed button A on and then button A off to make sure I have the matching code pair. I can now use them for turning my rc switch on and off. |
I have a rc switch with auto code learning + remote control that I want to use to control using an "Arduino" (acutally an Elegoo Uno R3 which is a cheap Arduino UNO copy) with the sender of this transmitter module. I'm using it with 5V and the transmitting distance is less than 10cm.
The rc switch is already set up to turn on and off with button
A on
andA off
of the remote and responds to the control's commands accordingly.Using ReceiveDemo_Simple.ino on the "Arduino" with the receiver module, shows the following output:
I receive a 32 bit number twice per button press.
Using ReceiveDemo_Advanced.ino on the "Arduino" with the receiver module to decode the remote, shows the following output once per button press. I recorded multiple times and those are the most common results in about 9 out of 10:
Button A on:
Button A off:
Because as stated above with
ReceiveDemo_Simple
I reveived two signals after one button press, I guess the number of transmission repetitions should be2
. When using this together with the other extracted values in a sketch based on SendDemo on a second "Arduino" with a sender module like:I would have assumed that the rc switch should toggle between on and off every 5 seconds. However nothing happens. I also don't receive anything on the serial output of my receiver (neither with
ReceiveDemo_Simple
nor withReceiveDemo_Advanced
).Commenting out
mySwitch.setRepeatTransmit(2);
leads to the receiver receiving viaReceiveDemo_Advanced
4, viaReceiveDemo_Advanced
2 equal signals every 5 seconds, alternating between2661182867
and1224304851
after each time span. So that seems kind of good, but the switch does not do anything.Output of Receive_Demo_Advanced when recording the signal emitted by my "Arduino" with sender module:
Using SimpleRcScanner.ino with the receiver "Arduino" leads to the following when pressing the remote button A alternating between on and off:
Remote 1st run button A on:
Remote 2nd run button A on:
Remote 3rd run button A on:
Remote 1st run button A off:
Remote 2nd run button A off:
Remote 3rd run button A off:
From the Arduino with sender module I capture:
When visualizing the raw data with https://test.sui.li/oszi/ i get:
Remote on:
Remote off:
Arduino with sender module:
Unlike in the picture of Add_New_Remote_Part_1 the common part of the signals seems to be at the end. If i compare it against the raw data that i got from the Arduino with the sender it does not match. The signal produced by the Arduino is also shorter than the ones produced by the remote.
As an additional observation I also noticed that I receive different data when pressing one button repeatedly without alternating between on or off.
The visualization of the raw data I got via
ReceiveDemo_Advanced
is shorter than the one viaSimpleRcScanner
and seems to be incomplete.Above SimpleRcScanner, below ReceiveDemo_Advanced:
The text was updated successfully, but these errors were encountered: