Update _433_Programming.ino

This commit is contained in:
AK-Homberger
2019-07-21 14:16:52 +02:00
committed by GitHub
parent 1761942074
commit f82f1998be

View File

@@ -1,44 +1,44 @@
/* /*
Example for different sending methods Example for different sending methods
http://code.google.com/p/rc-switch/ http://code.google.com/p/rc-switch/
*/ */
#include <RCSwitch.h> #include <RCSwitch.h>
long unsigned int Key1 = 0000001; / Cange to individual (random) values long unsigned int Key1 = 0000001; // Cange to individual (random) values
long unsigned int Key2 = 0000002; long unsigned int Key2 = 0000002;
long unsigned int Key3 = 0000003; long unsigned int Key3 = 0000003;
long unsigned int Key4 = 0000004; long unsigned int Key4 = 0000004;
RCSwitch mySwitch = RCSwitch(); RCSwitch mySwitch = RCSwitch();
void setup() { void setup() {
Serial.begin(9600); Serial.begin(9600);
// Transmitter is connected to Arduino Pin #10 // Transmitter is connected to Arduino Pin #10
mySwitch.enableTransmit(10); mySwitch.enableTransmit(10);
// Optional set pulse length. // Optional set pulse length.
// mySwitch.setPulseLength(320); // mySwitch.setPulseLength(320);
// Optional set protocol (default is 1, will work for most outlets) // Optional set protocol (default is 1, will work for most outlets)
// mySwitch.setProtocol(2); // mySwitch.setProtocol(2);
// Optional set number of transmission repetitions. // Optional set number of transmission repetitions.
// mySwitch.setRepeatTransmit(15); // mySwitch.setRepeatTransmit(15);
} }
void loop() { void loop() {
/* Same switch as above, but using decimal code */ /* Same switch as above, but using decimal code */
mySwitch.send(Key1, 24); // use key 1 to key 4 to program remote control (key A to D) mySwitch.send(Key1, 24); // use key 1 to key 4 to program remote control (key A to D)
delay(100); delay(100);
} }