Controlling a servo using 433 Hz rf modules

Hello arduino family,

I am a beginner and really need help for this project. I am trying to use a potentiometer on one arduino and then transfer that signal to the other arduino that has a servo attached to it to control it using a 433 Hz receiver and transmitter.

I have the receiver and transmitter codes attached please take a look at it and tell me if anything is wrong with it. I uploaded the sketches on my arduino unos and the servo kept vibrating instead of picking up a signal and turning with the potentiometer. I also have a picture of the connection attached so please take a look at that too.

Thank you very much.

Transmitter_code.ino (1.08 KB)

Receiver_code.ino (1.48 KB)

Your mistake is to try to do everything at once. Break the project into parts and get each part working before moving on.

Make sure that you can transmit the analog value and correctly receive it (using the serial monitor as an output), before adding the servo.

Why do you do all the following, and why do you think it will work?

void operateServo() {
  servo1.attach(servo_pin);
  servo1.write(mappedVal);
  delay(20);
  servo1.detach();
  delay(20);
}

Isn't it necessary to be able to control the servo properly?

If by "it" you mean ALL of the code I posted, no. The only required step is servo.write().

I would first try one of the servo sweep tutorials on the 'receiver' arduino to make sure I had the servo wired properly and could properly control it from code.

Secondly I would test the potentiometer on the 'transmitter' arduino to make sure that is wired properly and my reads gave me expected results.

Thirdly I would test the communication between the transmitter and receiver, without the pot or servo involved at all. Make sure the transmitter can send data and the receiver prints that same data.

After I had make each of those steps work, then I would try combining them.

Thank you for your replies.

I tried to check all that stuff out individually and it worked out fine, but whenever I put it together it doesn't work. Instead of turning, the motor keeps shaking. What do you think can be done to solve this problem?

Post a clear, hand drawn (NOT Fritzing!) wiring diagram, showing how everything is connected.

Many servo problems are due to improper grounding or inadequate servo power supplies. Never attempt to power servos or motors from the Arduino.

You checked it out individually and it worked?
Can you show us the wiring diagram of how everything is connected?
Can you show us the code that showed you that the servo worked?
Can you show us the code that showed you that your pot read worked?
Can you show us the code that showed you that your communication worked?

After that, show us the code that you used to try to tie them together.

Don't forget to use the code tags when you post your code.