Closed quaec closed 7 years ago
You have to set the protocol first, and then the pulse length. The reason is that setting the protocol also sets the pule length to the default for that protocol, so you need to change the pule length afterwards.
You can also do mySwitch.setProtocol(1, 144);
to set both at once.
Thanks a bunch, now it works!
Would it be a good idea to change the order in the demo file? For the case that somebody uncomments both the protocol line and the PulseLength line.
I've attached a pull request for this small change. Feel free to accept or decline the request.
Hello,
I'm trying to control a 433MHz outlet with this library, but it seems that setting the pulseLength doesn't work.
I'm using an Arduino UNO R3 and a FS1000A sending module.
The original remote has a PulseLength of 144 microseconds, but my sender sends always a signal with a PulseLength of 352 microseconds, even if I change it in the sketch.
I've captured the output of the original remote:
The sketch (based on the SendDemo):
What I get when running the sketch:
It doesn't matter if I try to make the PulseWidth shorter (144) or longer, it's always 352 ms.
Do you have an idea what's going wrong?