RCSwitch

 

static const RCSwitch::Protocol PROGMEM proto[] = {
#endif
{ 500, { 1, 31 }, { 1, 3 }, { 3, 1 }, false }, // protocol 1
{ 650, { 1, 10 }, { 1, 2 }, { 2, 1 }, false }, // protocol 2
{ 100, { 30, 71 }, { 4, 11 }, { 9, 6 }, false }, // protocol 3
{ 380, { 1, 6 }, { 1, 3 }, { 3, 1 }, false }, // protocol 4
{ 500, { 6, 14 }, { 1, 2 }, { 2, 1 }, false }, // protocol 5
{ 450, { 23, 1 }, { 1, 2 }, { 2, 1 }, true } // protocol 6 (HT6P20B)
};

 


 

/*
Example for receiving

http://code.google.com/p/rc-switch/

If you want to visualize a telegram copy the raw data and
paste it into http://test.sui.li/oszi/
*/

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
Serial.begin(9600);
mySwitch.enableReceive(0); // Receiver on inerrupt 0 => that is pin #2
}

void loop() {
if (mySwitch.available()) {
output(mySwitch.getReceivedValue(), mySwitch.getReceivedBitlength(), mySwitch.getReceivedDelay(), mySwitch.getReceivedRawdata(),mySwitch.getReceivedProtocol());
mySwitch.resetAvailable();
}
}

 


Decimal: 5329237 (24Bit) Binary: 010100010101000101010101 Tri-State: FF0FFF0FFFFF{D PulseLength: 440 microseconds Protocol: 1
Raw data: 13656,468,1284,1356,428,452,1312,1336,444,440,1332,432,1320,448,1320,1324,452,432,1336,1316,456,428,1344,1304,464,420,1340,428,1336,432,1332,1316,460,428,1336,1312,468,420,1340,1308,468,416,1352,1300,472,412,1348,1308,472,

Decimal: 5329237 (24Bit) Binary: 010100010101000101010101 Tri-State: FF0FFF0FFFFF{@ PulseLength: 440 microseconds Protocol: 1
Raw data: 13656,480,1288,1344,436,452,1316,1328,448,436,1328,444,1316,448,1320,1328,452,432,1332,1320,456,428,1344,1308,464,420,1348,424,1340,436,1332,1316,464,420,1340,1312,468,416,1348,1308,464,420,1348,1304,476,412,1344,1312,472,

Decimal: 5329237 (24Bit) Binary: 010100010101000101010101 Tri-State: FF0FFF0FFFFF PulseLength: 440 microseconds Protocol: 1
Raw data: 13664,472,1296,1348,436,448,1312,1336,440,444,1324,444,1312,448,1316,1328,456,424,1332,1312,456,424,1336,1316,456,424,1336,40,356,216,260,44,636,188,184,440,80,380,88,12,320,180,232,156,328,204,56,584,20,

Decimal: 5329236 (24Bit) Binary: 010100010101000101010100 Tri-State: FF0FFF0FFFF0< PulseLength: 439 microseconds Protocol: 1
Raw data: 13632,480,1288,1356,428,452,1308,1336,444,440,1328,440,1320,452,1312,1332,444,440,1324,1324,456,428,1336,1316,464,420,1340,428,1336,436,1328,1320,460,424,1336,1316,460,424,1340,1312,468,416,1348,1304,468,420,1352,416,1340,

Decimal: 5329236 (24Bit) Binary: 010100010101000101010100 Tri-State: FF0FFF0FFFF0 PulseLength: 440 microseconds Protocol: 1
Raw data: 13644,484,1284,1356,424,456,1316,1332,444,444,1324,440,1320,444,1320,1332,448,436,1328,1320,464,424,1336,1316,464,420,1340,432,1336,432,1332,1320,468,416,1336,1316,464,420,1340,1316,464,420,1348,1304,472,416,1348,420,1344,

Decimal: 5329236 (24Bit) Binary: 010100010101000101010100 Tri-State: FF0FFF0FFFF0 PulseLength: 440 microseconds Protocol: 1
Raw data: 13648,492,1276,1364,424,456,1308,1336,444,440,1332,440,1324,444,1316,1332,448,436,1332,1316,460,428,1336,1316,464,420,1344,428,1332,436,1336,1316,464,420,1340,1312,464,424,1340,1312,464,420,1344,1312,468,416,1348,424,1340,

Decimal: 5330260 (24Bit) Binary: 010100010101010101010100 Tri-State: FF0FFFFFFFF0 PulseLength: 440 microseconds Protocol: 1
Raw data: 392,856,60,324,64,616,208,48,328,268,344,72,52,640,360,168,796,292,288,32,884,236,12,52,136,208,20,96,420,176,948,60,348,32,32,44,1020,320,104,48,804,576,80,240,192,500,52,72,84,