Arduino Uno and Rc-Switch 433mhz tx test, wrong result

I'm trying to send a string via rc-switch library, here's my attempt:


RCSwitch mySwitch = RCSwitch();

void setup() {

  Serial.begin(9600);
  
  // Transmitter is connected to Arduino Pin #10  
  mySwitch.enableTransmit(10);
  
  // Optional set protocol (default is 1, will work for most outlets)
  // mySwitch.setProtocol(2);

  // Optional set pulse length.
  // mySwitch.setPulseLength(320);
  
  // Optional set number of transmission repetitions.
  // mySwitch.setRepeatTransmit(15);
  
}

void loop() { 
  Serial.println("Start..."); 
  mySwitch.send("0000000001"); 
}

My device receives and print in display this:

0000000010

It also gives me information "11bits". I'm not expert but as far as I can read in other posts I've observed prior to write, it seems the last bit is the "end of line".

Question: why that happens and how can I fix?

I have no clue why that device says 11 bits but displaying only 10 bits. As you failed to provide a link to that device it's up to you to interpret that using the manual.

The 10th bit is a misinterpretation of the SyncFactor as an additional bit by your receiving device. It seems you're using the RCSwitch library to send some information but didn't check that the two devices "talks" the same language.

I actually manage to get a result.
But you're right, I've put wrongly the answer.
Believe that's due to my poor experience.
I'll soon open a new thread with more precise question (I hope..)
Thanks the same!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.