Some sketch weirdness, when servo motor runs, arduino can't process RF signal

I created the following sketch on an arduino uno to controll my blinds with a servo motor, I use another arduino mega as home automation, to send an RF signal to arduino uno wich controlls the blinds on the back side of my house

when I send an RF signal to, open/close/stop the blinds and the servo motor starts running, it is not possible to receive another RF signal when the servo motor is running???

so basicly I have to pull the usb cable, to stop the servo motor, because it doesn't receive the RF messages to stop the servo motor as long as the servo motor runs?

#include <Servo.h>
#include <RemoteReceiver.h>

Servo servo;

void setup()
{
  servo.detach();
  Serial.begin(9600);
  //pinMode(2, OUTPUT); // Servo motor
  //pinMode (3, INPUT); // RF receiver
  RemoteReceiver::init(1, 1, luxaflex); // Pin 3 RF receiver (interrupt 1 pin 3 signaal 1 keer detecteren)
}

void loop()
{
}

void luxaflex(unsigned long receivedCode, unsigned int period)
{
  switch(receivedCode)
  {
    case 529980: // luxaflex open
      open();
      break;
    case 531420: // luxaflex stopt
      stopt();      
      break;  
    case 530952: // luxaflex dicht
      dicht();
      break;  
  }
  /*Serial.print("Code: ");
  Serial.print(receivedCode);
  Serial.print(", period duration: ");
  Serial.print(period);
  Serial.println("us.");*/
}

void open()
{
  servo.attach(2); // servo motor aan
  servo.writeMicroseconds(1275);
  Serial.println("De luxaflex gaat open");
}

void stopt()
{
  servo.detach(); // servo motor uit
  Serial.println("De luxaflex stopt");
}

void dicht()
{
  servo.attach(2); // servo motor aan
  servo.writeMicroseconds(1675);
  Serial.println("De luxaflex gaat dicht");
}

when I disable the servo code like this:

void open()
{
  //servo.attach(2); // servo motor aan
  //servo.writeMicroseconds(1275);
  Serial.println("De luxaflex gaat open");
}

void stopt()
{
  //servo.detach(); // servo motor uit
  Serial.println("De luxaflex stopt");
}

void dicht()
{
  //servo.attach(2); // servo motor aan
  //servo.writeMicroseconds(1675);
  Serial.println("De luxaflex gaat dicht");
}

the RF signals get detected and the messages are print in serial monitor.

but when the servo motor is spinning, the RF signals are not detected???

any thoughts?

The weird thing is, the same code on my arduino mega, to controll the blinds on the front side of my house works just fine?

Perhaps the servo is creating enough electronic noise that the receiver can't receive a good signal.

Does the receiver work if the servo control wire is disconnected but the software still tries to control the servo? If yes, try to add some shielding. If no, the servo library is probably trying to use the same timer as the RemoteReceiver library so you have to deal with the conflict.

How close is the motor to your receiver?
It sounds to me like the motor is generating interference and swamping the receiver.

So interference suppression on the servo looks like a good thing to look at. So that would mean lots of supply decoupling and capacitors across the motor if you can get to it.

when I disconnect the servo control pin, the RF messages are received

the servo motor is 25cm, 9,84 inches away from the RF receiver, when it's inside a box

but when I open the box, to acces the arduino and pins, to test it, the RF receiver is hanging loose below the box on wires, it is actually further away from the servo, about 58cm, 22,83 inches and then it also doesn't work

so you both are right, must be interference from the servo motor lol.

never would have thought of this lol

So what can I do to minimise such interference?

without having to move the box mounted to the wall where the arduino is in

this would also explain why the other blinds on the arduino mega are working, because the servo is about 2 meters, 78,74 inches away from the arduino lol

would it help if I opened the plastic housing of the servo motor, and put tin foil in it, to the walls of the plastic housing?

did you try Mike's suggestion of the decoupling capacitors?

I have no idea what decoupling capacitors means???

I'm reading this however:

Read this as well:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Try the decouping capacitors.

If that doesn't help enough, try running the servo wires through a ferite ring.

If those don't help enough, wrap the servo in grounded metal foil.