Hello
I need to add a '#' into each data of array. but i've no idea how to do so as i did many ways to accomplish that
first time i read the 48 bytes adc value from 24 analog sensor (2 bytes for each) and store the value in a variable. Then I need to display each of them into textbox in the desktop app i made with VB.
here adc reading code which goes well if i send all of the data without any addition character
while (Serial1.available())
{
for (indexReply=0; indexReply<24; indexReply++)
{
thisByteReply = Serial1.read();
value[indexReply] = thisByteReply;
if (indexReply>=23)
{
Serial.write(value, indexReply); //directly send all of 'value' with 24 in length
}
}
}
then i have to send all of the values through serial with character '#' added exactly between each of the 24 data. lets say all of the sensor give full adc 10bit value which is 1023, so the data i want to send will be like this :
1023#1023#1023#1023#1023#10231023#1023#1023#1023....#1023
so that the desktop app i made can parse and display each of them in textbox correctly.
I have some trial and nothing of them runs well,
such this :
String sign = "#";
String objectSent = sign + value[indexReply=0] + sign + . . .+ value[indexReply=23]; //consider the variable written 24 times
Serial.print(objectSent);
kindly please assist me some help i really appreciate