Hi
I want to send and receive data between two arduino boards
i have a pair of sender and receiver RF 315 Mhz module & rc-switch library
I can receive the pulse that remote controllers send with the receiver
but i have problem with the sender
the sender send 4 times (instead of 1 time)
it means that if i use "mySwitch.send(5034209, 24);" it like that it will be run 4 times !!!
(I received 4 times)
but i dont have this problem with remote controller
this is my sender code
/*
Example for different sending methods
https://github.com/sui77/rc-switch/
*/
#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() {
mySwitch.send(5034209, 24);
delay(5000);
}