help with serial!

Hi all, I need help:
I need to read this data string, character by character

f0,0,0,0,0,0,0,0,0,0,0,0,0514,0525,0496,0514,0495,0493,0507,0508,0515,0503,0506,0497,0498,0505,0,0,0,0,0,0,0

int a[1];
int state = 0;
int contador = 0;
int contador_errors = 0;
int buffer[108];

void setup()
{
  Serial.begin(19200);
  Serial3.begin(19200);
}

void loop()
{
  while (state == 0)
  {
    if(contador_errors > 5)
    {
      Serial.print("No hay señal!");
      Serial.print("State = 1");
      state = 1;
      contador = 0;
      delay(1000);
    }
    if((Serial3.available() > 0))
    {
      a[0] = Serial3.read();
      buffer[contador] = a[0];
       Serial.print(buffer[contador]);
      contador++;
      contador_errors = 0;

     if(a[0] == 'f')//23 total sense el 0
      {
         c2++;
        contador = 0;
        if(c2 >= 2)state = 1; //leer 2 veces y me voy a mostrar todo el contenido
      }

    }
  }
  
  
  while (state == 1)
  {

    contador = 0;
    while(contador < 108)
    {
      Serial.println(buffer[contador]);
      delay(100);
      contador++;
    }

delay(2000);
state = 0;
  }
}

Not because I do not read character by character!
HELP PLEASE!!!

I think you need to explain what you want to do more clearly.

It seems as if something sends that long stream of data to Serial3 on your Arduino.

What do you want to do with the data?
Why does it start with an ‘f’ - what should happen when the ‘f’ is detected?

Will there always be the same number of characters (and the comma is a character, as well as the numbers) or how will you know when the end of the data stream is reached?

I notice that there are commas separating the characters into groups. Some groups have one character, other groups have 4 characters. Do you want to to save each group as an integer value?

My approach would be to save the entire stream of data into a char array and then parse it into it’s separate parts. The Arduino code in Reply #4 in this demo should give you ideas for doing both.

…R