I have two sets of data packets I would like to transfer them via Bluetooth slave master. These packets should be sent separately i.e. one after the other, in that there should be a delay in transfer between the two packets.
What do you think is the best way to go about it. appreciate your advice.
Use start and end markers on each packet and include a packet type identifier with them. The packet type identifier could be used as the start marker
UKHeliBob:
Use start and end markers on each packet and include a packet type identifier with them. The packet type identifier could be used as the start marker
Okay
This might help Serial input basics - updated
The technique in the 3rd example in Serial Input Basics will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.
You can send data in a compatible format with code like this (or the equivalent in any other programming language)
Serial.print('<'); // start marker
Serial.print(value1);
Serial.print(','); // comma separator
Serial.print(value2);
Serial.println('>'); // end marker
...R
Robin2:
The technique in the 3rd example in Serial Input Basics will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.You can send data in a compatible format with code like this (or the equivalent in any other programming language)
Serial.print('<'); // start marker
Serial.print(value1);
Serial.print(','); // comma separator
Serial.print(value2);
Serial.println('>'); // end marker
...R
UKHeliBob:
This might help Serial input basics - updated
So does the start and end makers work with both the slave and master?
i,m alittle confused about the slave part,if the same StartEndMaker applies when it comes to the send part
You add the start and end markers to the data at the Tx end and use them when processing the data at the Rx end
You can try Robin's examples using the Serial monitor on one Arduino as a start
UKHeliBob:
You add the start and end markers to the data at the Tx end and use them when processing the data at the Rx endYou can try Robin's examples using the Serial monitor on one Arduino as a start
okay now i get it.
Thank you guys