Skip to content

Commit

Permalink
RCSwitch: change PulseLength to 270ms
Browse files Browse the repository at this point in the history
  • Loading branch information
xkonni committed Nov 24, 2012
1 parent 38e6b6b commit 3c03aa8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions send.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ int main(int argc, char *argv[]) {
if (wiringPiSetup () == -1) return 1;
printf("sending systemCode[%s] unitCode[%i] command[%i]\n", systemCode, unitCode, command);
RCSwitch mySwitch = RCSwitch();
mySwitch.setPulseLength(270);
mySwitch.enableTransmit(PIN);

switch(command) {
Expand All @@ -31,6 +32,14 @@ int main(int argc, char *argv[]) {
case 0:
mySwitch.switchOff(systemCode, unitCode);
break;
case 2:
// 00001 2 on binary coded
mySwitch.send("010101010001000101010001");
break;
case 3:
// 00001 2 on as TriState
mySwitch.sendTriState("FFFF0F0FFF0F");
break;
default:
printf("command[%i] is unsupported\n", command);
return -1;
Expand Down

0 comments on commit 3c03aa8

Please sign in to comment.