Problem with servos

Hello forum,
During Covid-19, I decided to start a project involving Arduino (Uno and nano). This would be my first time messing around with electronics, and I wanted to build an RC plane.
I managed to do enough research to have 2 servos working wirelessly (using the NRF24l01 antenna version), it was working wonderfully. However, when I changed to code to accommodate 3 servos, it did not work anymore. When I plugged the receiving circuit (nano) into power, the servos would go to the correct position (to the position the input told them) and stay there, no matter how much I moved my input devices on the transmitting board (uno) the servos did nothing. However, once in a blue moon it would work, the servos would move when I told them, but then they would stop working again if I moved the wires too much. I don’t know if the problem lays in the wiring or the code, or even power, but since I’m new, and there are people who are better at this than me, I thought I might post this message and my code to see if anyone had any advice.

The codes should be attachments below

Transmitter

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>

int angleValue[3];

RF24 radio(7, 8 ); // CE, CSN
const byte addresses[6] = {“00001”, “00002”};

void setup() {
radio.begin();
radio.openWritingPipe(addresses[1]); // 00002
radio.openReadingPipe(1, addresses[0]); // 00001
radio.setPALevel(RF24_PA_MIN);
}

void loop() {
delay(5);

radio.stopListening();
angleValue[0] = analogRead(A0);
angleValue[1] = analogRead(A1);
angleValue[2] = analogRead(A2);
angleValue[0] = map(angleValue[0], 0, 1023, 0, 180);
angleValue[1] = map(angleValue[1], 0, 1023, 0, 180);
angleValue[2] = map(angleValue[2], 0, 1023, 0, 180);
radio.write(&angleValue, sizeof(angleValue));
{
Serial.println(angleValue[0]);
Serial.println(angleValue[1]);
Serial.println(angleValue[2]);
}
}

Receiver :

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <Servo.h>

Servo servo1;
Servo servo2;
Servo servo3;

RF24 radio(7, 8 ); // CE, CSN
const byte addresses[6] = {“00001”, “00002”};
int angleV[3];

void setup() {
servo1.attach(5);
servo2.attach(6);
servo3.attach(3);
radio.begin();
radio.openWritingPipe(addresses[0]); // 00001
radio.openReadingPipe(1, addresses[1]); // 00002
radio.setPALevel(RF24_PA_MIN);
}

void loop() {
delay(5);
radio.startListening();
if ( radio.available()) {
while (radio.available()) {
radio.read(&angleV, sizeof(angleV));
servo1.write(angleV[0]);
servo2.write(angleV[1]);
servo3.write(angleV[2]);
}
{
Serial.println(angleV[0]);
Serial.println(angleV[1]);
Serial.println(angleV[2]);
}

}
}

Power supply?
Radio decoupling?

A schematic would be useful.

Please remember to use code tags when posting code

Please use Code tags </> NOT quote tags. And also post the code that was working wonderfully with 2 servos.

How is everything powered? And connected? As well as a schematic, photos might help.

Steve

Why are you using a UNO?

I suppose if we had any idea whatsoever about how you have assembled it all, we might have some ideas. :grinning:

I do hope you are not attempting to use the basically useless "Vin" pin or the "barrel jack". :astonished:

If it works at all , even randomly, it's wired correctly.
Recheck all your connections, especially power.
Do you have a DMM yet ?
It's almost impossible to tele-troubleshoot if the user cannot measure voltages.
If you are going to use electronics , you need a DMM. (yes, THEORETICALLY, if you never made any errors and
all your connections and code was good , you wouldn't need one, but that isn't the case right now , is it ?
One of the most important functions of a meter is to do continuity checks. Evidently, ONE or MORE of your
wire connections is intermittent. I suggest you ignore the RF link for now and get all three servos working
hard wired. Once you have verified that, we can address the possibility that your radio link has issues.
We can't do that right now because nothing is working. Either go back to two servos and verify that or
shelf the radio until you have the servos working and go back to a radio link.

I do hope you are not attempting to use the basically useless "Vin" pin or the "barrel jack".

Really, do we have to go there ?

raschemmel:
Really, do we have to go there ?

He said servos. :astonished:

And we have no idea what he has actually connected. :roll_eyes:

no we don't.
Why disclose everything in your OP when you can
drag it out for 100 posts ?

Thank you all for your replies.
I managed to get it to work. To be honest, I don't know what I did, but it works. Thank you for your time.