/* Example for different sending methods http://code.google.com/p/rc-switch/ */ #include RCSwitch mySwitch = RCSwitch(); void setup() { Serial.begin(9600); // Transmitter is connected to Arduino Pin #7 mySwitch.enableTransmit(7); // Optional set pulse length. mySwitch.setPulseLength(680); // Optional set protocol (default is 1, will work for most outlets) mySwitch.setProtocol(2); // Optional set number of transmission repetitions. // mySwitch.setRepeatTransmit(15); } void loop() { /* Same switch as above, but using decimal code and #bits */ mySwitch.send(123456789, 32); delay(1000); mySwitch.send(123456788, 32); delay(1000); }