Alwin07:
But if I use my remote control connected with rfm95W it doesn't work! 
#include <SPI.h>
#include <Servo.h>
#include <RH_RF95.h>
#define RF95_FREQ 868.0
#define RFM95_CS 4
#define RFM95_RST 2
#define RFM95_INT 3
#define MIN_PULSE_LENGTH 1180 // Minimum pulse length in µs
#define MAX_PULSE_LENGTH 1508 // Maximum pulse length in µs
RH_RF95 rf95(RFM95_CS, RFM95_INT);
Servo m1, m2, m3, m4;
void setup()
{
pinMode(RFM95_RST, OUTPUT);
pinMode(RFM95_RST, OUTPUT);
digitalWrite(RFM95_RST, HIGH);
Serial.begin(115200);
while (!Serial)delay(1);
delay(100);
Serial.println("Starting...");
Serial.println("Attach motors");
m1.attach(7, MIN_PULSE_LENGTH, MAX_PULSE_LENGTH);
m2.attach(8, MIN_PULSE_LENGTH, MAX_PULSE_LENGTH);
m3.attach(9, MIN_PULSE_LENGTH, MAX_PULSE_LENGTH);
m4.attach(10, MIN_PULSE_LENGTH, MAX_PULSE_LENGTH);
m1.writeMicroseconds(MIN_PULSE_LENGTH);
m2.writeMicroseconds(MIN_PULSE_LENGTH);
m3.writeMicroseconds(MIN_PULSE_LENGTH);
m4.writeMicroseconds(MIN_PULSE_LENGTH);
delay(8000);
digitalWrite(RFM95_RST, LOW);
delay(10);
digitalWrite(RFM95_RST, HIGH);
delay(10);
while (!rf95.init()) {
Serial.println("LoRa radio init failed");
while (1);
}
Serial.println("LoRa radio init successful!");
if (!rf95.setFrequency(RF95_FREQ)) {
Serial.println("setFrequency failed");
while (1);
}
rf95.setTxPower(23, false);
}
void loop()
{
if (rf95.available())
{
uint8_t buf[RH_RF95_MAX_MESSAGE_LEN];
uint8_t len = sizeof(buf);
if (rf95.recv(buf, &len))
{
char* received = (char*)buf;
if(received[0] == ':'){
String property = "";
String val = "";
bool pf = false;
for(unsigned int i = 1; i < strlen(received); i++){
if(received[i] == ',')pf = true;
else if(received[i] == ':'){
//Serial.print(property);Serial.print(": ");
//Serial.println(val);
if(property == "speed"){
int realspeed = val.toInt()*5+MIN_PULSE_LENGTH;
setESC(realspeed);
}
pf = false;
val="";
property="";
}
else if(pf)val+= received[i];
else property+=received[i];
}
}
else if(strcmp(received, "rssi") == 0){
uint8_t data[] = "1";
rf95.send(data, sizeof(data));
rf95.waitPacketSent();
}
}
else Serial.println("Receive failed");
}
}
int lastValue = 0;
void setESC(int val){
if(val != lastValue){
Serial.print("Pulse length = ");
Serial.print(val);
Serial.print(" (");
Serial.print((((float)val-(float)MIN_PULSE_LENGTH)/((float)MAX_PULSE_LENGTH - (float)MIN_PULSE_LENGTH))*100);
Serial.println("%)");
m1.writeMicroseconds(val);
m2.writeMicroseconds(val);
m3.writeMicroseconds(val);
m4.writeMicroseconds(val);
lastValue = val;
}
}
I found out a very interresting thing. If I add after setESC(realspeed); (in the middle of the code in the for loop) a delay(1000) it works without clicking, BUT my command have a delay of 1 second (who would have thought that)