Separating ASCII Datas

Good morning everyone,

Well, actually i've done a project which is collecting data from a solar controler using RS232 then send it to server database using MySQL. I've posted it in this post CRLF RS232 in Arduino - Programming Questions - Arduino Forum

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:

  1. 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

  2. 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,

Would you like to help me please?

I attach image of data in this post also,

Do you wan ta picture of some code to parse the data? Or would some text be far more useful?

If the code would be more useful than a picture, post your data AS TEXT!

i'm very sorry,

this is the data:

R:12,85;13,0;09;11,60;21,94;08,9;15,8;

string contained 38 data, started with R: and separated by ;,

Take some time to study C pointers, then read the documentation for strtok().

this is the data:

R:12,85;13,0;09;11,60;21,94;08,9;15,8;

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.

There is a parse example in serial input basics.

...R

or why it appears that there are commas where there should be dots,

Looks like some strange foreign decimal notation.