2 This is a minimal sketch without using the library at all but only works for
3 the 10 pole dip switch sockets. It saves a lot of memory and thus might be
4 very useful to use with ATTinys :)
6 https://github.com/sui77/rc-switch/
12 pinMode(RCLpin, OUTPUT);
16 RCLswitch(0b010001000001); // DIPs an Steckdose: 0100010000 An:01
19 RCLswitch(0b010001000010); // DIPs an Steckdose: 0100010000 Aus:10
23 void RCLswitch(uint16_t code) {
24 for (int nRepeat=0; nRepeat<6; nRepeat++) {
25 for (int i=4; i<16; i++) {
27 if (((code << (i-4)) & 2048) > 0) {
37 void RCLtransmit(int nHighPulses, int nLowPulses) {
38 digitalWrite(RCLpin, HIGH);
39 delayMicroseconds( 350 * nHighPulses);
40 digitalWrite(RCLpin, LOW);
41 delayMicroseconds( 350 * nLowPulses);