/*
SendDemo - sends RF codes.
*/
#include <RCSwitch.h> //
https://github.com/sui77/rc-switch
RCSwitch mySwitch = RCSwitch();
void setup() {
// VCC : 3.3V
// GND : GND
// Data : 7
// ANT : in between the two headers!
// Data
pinMode(7, OUTPUT); // Either way, we'll use
pin 7 to drive the data pin of the transmitter.
Serial.begin(9600);
// Transmitter is connected to Arduino Pin #10
mySwitch.enableTransmit(7);
}
void loop() {
static long value=0;
// mySwitch.send(value, 24);
mySwitch.send(value, 32);
value++;
delay(1000);
} |