From f82f1998be5e82e9ee9c2eb981c900d7fe771b43 Mon Sep 17 00:00:00 2001 From: AK-Homberger <53138495+AK-Homberger@users.noreply.github.com> Date: Sun, 21 Jul 2019 14:16:52 +0200 Subject: [PATCH] Update _433_Programming.ino --- .../_433_Programming/_433_Programming.ino | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/AP-Remote-Software/_433_Programming/_433_Programming.ino b/AP-Remote-Software/_433_Programming/_433_Programming.ino index fa37917..0b6ff79 100644 --- a/AP-Remote-Software/_433_Programming/_433_Programming.ino +++ b/AP-Remote-Software/_433_Programming/_433_Programming.ino @@ -1,44 +1,44 @@ -/* - Example for different sending methods - - http://code.google.com/p/rc-switch/ - -*/ - -#include - -long unsigned int Key1 = 0000001; / Cange to individual (random) values -long unsigned int Key2 = 0000002; -long unsigned int Key3 = 0000003; -long unsigned int Key4 = 0000004; - - -RCSwitch mySwitch = RCSwitch(); - -void setup() { - - Serial.begin(9600); - - // Transmitter is connected to Arduino Pin #10 - mySwitch.enableTransmit(10); - - // Optional set pulse length. - // mySwitch.setPulseLength(320); - - // 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 */ - mySwitch.send(Key1, 24); // use key 1 to key 4 to program remote control (key A to D) - delay(100); - - +/* + Example for different sending methods + + http://code.google.com/p/rc-switch/ + +*/ + +#include + +long unsigned int Key1 = 0000001; // Cange to individual (random) values +long unsigned int Key2 = 0000002; +long unsigned int Key3 = 0000003; +long unsigned int Key4 = 0000004; + + +RCSwitch mySwitch = RCSwitch(); + +void setup() { + + Serial.begin(9600); + + // Transmitter is connected to Arduino Pin #10 + mySwitch.enableTransmit(10); + + // Optional set pulse length. + // mySwitch.setPulseLength(320); + + // 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 */ + mySwitch.send(Key1, 24); // use key 1 to key 4 to program remote control (key A to D) + delay(100); + + }