sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.91k stars 659 forks source link

Want to send RAW DATA. #326

Open tsotnek opened 4 years ago

tsotnek commented 4 years ago

Hello,

So I want to copy my 433Mhz remote data from one to another but when I copy the binary signal and the signal pulse length is the same but the RAW data is different.

This is the original recieved data:

Decimal: 7309986 (24Bit) Binary: 011011111000101010100010 Tri-State: not applicable PulseLength: 199 microseconds Protocol: 1 Raw data: 4584,380,152,456,300,300,232,300,208,300,300,232,300,236,296,232,300,228,300,232,300,480,304,452,304,476,304,204,304,476,304,228,304,452,304,228,304,472,304,204,304

And this is the copied recieved data:

Decimal: 7309986 (24Bit) Binary: 011011111000101010100010 Tri-State: not applicable PulseLength: 198 microseconds Protocol: 1 Raw data: 6164,176,652,572,244,576,252,152,664,568,256,568,256,556,260,556,268,548,272,136,680,136,680,140,684,540,272,144,676,556,268,136,684,548,272,132,688,544,276,136,680,140,680,140,680,552,268,136,672,

The code I am using for transmission is:

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {

 Serial.begin(9600);
 // Transmitter is connected to Arduino Pin #10 
 mySwitch.enableTransmit(10);
 // Optional set pulse length.

 // set protocol (default is 1, will work for most outlets)
 mySwitch.setProtocol(1);

  mySwitch.setPulseLength(199);
 // Optional set number of transmission repetitions.
 // mySwitch.setRepeatTransmit(15);
 pinMode(13,OUTPUT);
}
void loop() {
 mySwitch.send("011011111000101010100010");
 digitalWrite(13,HIGH);
 delay(500);
 digitalWrite(13,LOW);
 delay(1000); 
}

Could anyone help me on how to transmit the raw data as well so they will be somewhat similar?

Thanks