My goal now is to have two joysticks, one for pan and the other for tilt, that can control two servos for their respective uses.
For context I am using the arduino nano and uno r3. The way I initially wanted to do it is with the r3 transmitting signal from two joysticks to the nano which would be receiving the separate signals to control their respective servos.
I am trying this with the NRF24L01 boards and the nrf24 library by TMRh20, but from what I understand each board can only open one writing pipe at a time. Which would be fine but I want to be able to send signal from both joysticks at the same time so that they can be working in unison. So I thought, ok I’ll use two of these nrf boards, one for pan and one for tilt.
From what I understand about the boards is they use the SPI pins to communicate with the arduino and that there are only one of each respective SPI pin within the arduinos. So I thought ok I’ll just use another nano to transmit signal from the other joystick. The uno for pan and another nano for tilt. Both being transmitted to the receiving nano with the servos.
Now the issue arrives with the nrf boards only being able to receive one signal at a time. Which again I want to be able to move both servos in unison, which would require reading both signals at the same time. So now I’m thinking I use another nrf board for the other servo, but since it needs the SPI pins I would need another arduino.
So from what I understand I would need 4 separate arduinos. 2 for separate transmission of the joysticks and two to receive and operate the two servos simultaneously.
I’m fairly new to all of this so it’s very possible I’m missing something simple or am going about this the entire wrong way. I would like to know if my thought process is sound and I wouldn’t be hooking up 4 arduinos and 4 nrf boards when there’s a simpler way of doing this.
I had an idea where I would only need two for transmission and one for receiving. Could I have the receiving arduino put a very short delay in the loop where it reads information from one pipe to read one joystick and control one servo, then after that delay it reads the other pipe with the other joystick controlling the other servo. If I have the delay be very small could I mimic it working in unison? This idea would reduce the number of arduinos and nrf boards needed to 3 of each, but if that works would I also be able to do that with just 2 of each like how I originally wanted it? Just have the r3 quickly swap between writing information from one joystick to the other and have the nano swap to controlling the respective servo from the respective joystick. I would have it swap at the same time as the r3 so it would know which joystick to talk too. This would only need 2 arduinos and 2 nrf boards like I originally wanted it, but would only work if I could swap fast enough to mimic simultaneous control.
Forgive me if any of my terminology is wrong I’m still very new to this. Is any of this feasible or is there a simpler way of going about this?