I am trying to get a system working where one arduino is transmitting speeds over an nRF2401 transmitter to four arduinos being used to control a system of motors while these arduinos transmit encoder data back using ackpayload.
At this point, I'm still just trying to get four-way output to work with ack feedback. Communication works in both directions with three, but when I add a fourth pipe for it to switch to, it fails. The transmitter still receives the ack, but for the receiver, radio.available() returns false.
I'm avoiding using one receiver and four transmitters because I need those four to track encoders, and from what I understand, writing is blocking and would interfere with the encoder. I don't know if this is avoidable, or if writing the ack will create the same issue or not.
Hi,
I'm working on a similar project with wireless motors control system.
I suggest you to avoid transmitting encoder data back to the main unit using ackpayload.
If you will send/read data with intervals, then it's OK with ACK, but if you will send/receive data continuously any lost packet will force the transmitter send same packet again and that could slow your system because will create a delay.
I had this problem and now I'm sending/receiving data using only 2 x transmitters and data structure , so all data is sent in one packet.
typedef struct
{
int Motor1Angle;
int Motor2Angle;
byte Motor1Speed;
byte Motor2Speed;
} Payload1;
Payload1 theData; // create transmission package 'theData'.