Uploaded from my local repository
[433Utils_NP] / rc-switch / examples / TypeD_REV / TypeD_REV.ino
1 /*
2   Example for REV outlets (e.g. 8342L)
3   
4   https://github.com/sui77/rc-switch/
5   
6   Need help? http://forum.ardumote.com
7 */
8
9 #include <RCSwitch.h>
10
11 RCSwitch mySwitch = RCSwitch();
12
13 void setup() {
14
15   // Transmitter is connected to Arduino Pin #10  
16   mySwitch.enableTransmit(10);
17   
18   // set pulse length.
19   mySwitch.setPulseLength(360);
20   
21 }
22
23 void loop() {
24
25   // Switch on:
26   // The first parameter represents the channel (a, b, c, d)
27   // The second parameter represents the device number
28   // 
29   // In this example it's family 'd', device #2 
30   mySwitch.switchOn('d', 2);
31
32   // Wait a second
33   delay(1000);
34   
35   // Switch off
36   mySwitch.switchOff('d', 2);
37   
38   // Wait another second
39   delay(1000);
40   
41 }
Contact me: dev (at) shalnoff (dot) com
PGP fingerprint: A6B8 3B23 6013 F18A 0C71 198B 83D8 C64D 917A 5717