der Sendesketch:
#include <RCSwitch.h>
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() {
// Hier die Daten welche ich vom Empfänger bekommen habe
/* Same switch as above, but using decimal code */
mySwitch.send(1393684, 24);
delay(1000);
mySwitch.send(1393684 24);
delay(1000);
delay(20000);
}
Angeschlossen:
Data an Pin 10
VCC 5V
Ground GND