but, i've a bit of problem, because the data i received in the form of string of ASCII Code, so i need to separated it or parse it, but i don't have any idea on how i could do that.
I attach image of data in this post also,
there are 2 point that i want to do:
I want to separated all of data that separated by ";" then I would like to delete "R:" data
so what i get just the "number" value
i want to group each value into a new strings, for example, the first value is a, the second is b, until the seventh value is g, then return again,
string contained 38 data, started with R: and separated by ;,
So, this code:
char *token = strtok(data, ";");
while(token)
{
// Do something with the token...
token = strtok(NULL, ";");
}
will get you the tokens "R:12,85", "13,0", "09", "11,60", "21,94", "08,9", and "15,8"
I don't know what is sending that data, or why it appears that there are commas where there should be dots, but if you can fix the sender to send useful data, those tokens could be converted to floats or ints using atof() and/or atoi() as appropriate.