sui77 / rc-switch

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

added posibility to send raw data #406

Open MPK44 opened 3 years ago

MPK44 commented 3 years ago

As not all protocolls are already identified, a possibility to send data without decrypting a new protocoll is helpful. This commit adds the function "sendraw" so that a file, storing pulselengths, can be used to send commands.

aronlanza commented 2 years ago

Hello could you please make an example, how to use your method? If I have understood the function correctly, I pass your method the rawdata which is received with the RC Recive Demo Advance. My raw data looks like this: Decimal: 3640829401 (32Bit) Binary: 11011001000000101010010111011001 Tri-State: not applicable PulseLength: 652 microseconds Protocol: 2 Raw data: 6524,1280,676,1280,676,628,1328,1276,676,1280,676,628,1328,628,1328,1276,680,624,1328,632,1324,628,1328,628,1328,628,1324,632,1324,1280,676,628,1328,1276,676,628,1328,1284,672,628,1328,628,1328,1276,676,628,1328,1280,676,1280,676,1276,680,624,1328,1280,676,1276,680,628,1328,628,1324,1280,676,

MPK44 commented 2 years ago

Hi aronlanza,

you are nearly right. Currently it is that you pass a filename where you store the RAW data. This means if you put your raw data in example.txt and replace , with newline (\n) you can send your code with sendRaw example.txt

In your case it will start with 6524 Microseconds high, 1280 low, 676 high.

example.txt

6524 1280 676 1280 676 628 1328 1276 676 1280 676 628 1328 628 1328 1276 680 624 1328 632 1324 628 1328 628 1328 628 1324 632 1324 1280 676 628 1328 1276 676 628 1328 1284 672 628 1328 628 1328 1276 676 628 1328 1280 676 1280 676 1276 680 624 1328 1280 676 1276 680 628 1328 628 1324 1280 676

M-C-Dev commented 1 year ago

i got: \rc-switch/RCSwitch.cpp:553: undefined reference tofopen'`