RF module sending problem

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);  

}

Try

mySwitch.setRepeatTransmit(1);

In setup.

That said, your receiver sketch should ignore repeaded instances of the same message in rapid succession. OOK rf is flaky in general due to the vulnerability to interference and the AGC adjusting itself to match the strength of the signal. Its normal to send each message several times to make sure it gets through.

thanks a lot for your help
i try it and it worked fine

I want to make acknowlege system for RF