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?