Hello,
I'm using the following for example to transmit an array from one arduino nano to another using an RF transceiver (set at 9600 baud) using newsoftserial on pins 4,5 on both:
// transmitter
char tx_data[13] = {0x02,0x02,num_1,num_2,num_3,num_4,num_5,num_6,num_7,num_8,0x02,0x02,0x00};
transceiver.print(tx_data);
// receiver
if(transceiver.available()) {
int index = 0;
byte response[13];
while(transceiver.available() > 0) {
response[index] = transceiver.read();
index++;
}
}
Each of the "num_x" is a dynamic value between 0-254. I had to put a leading/trailing "0x02,0x02" so on the receiver I can sort of do rx validation as too often there is junk data being received (possibly interference).
While this method works, the problem is I can't transmit faster than a 150 second delay between transmissions otherwise the receiving arduino doesn't read it for some reason.
I know there is limitations of speed at 9600 baud, but I'm wondering if anyone knows of a better way to send an array like that where it can send a bit quicker.
Any help would be appreciated.