Convert data serial Port


I would like to use the serial port to control the flashing of a led.
Principle: I send the delay between the character “a” and ";"by terminal.
To do this, I record data, byte by byte, in a char variable and I convert it to int.

Someone could tell me where my code is wrong.

Thanks for your help.

sketch_feb06a.ino (858 Bytes)

This part is complete nonsense

  int received =;          // On les récupère
 if(Serial.available() > 0) 
    if(received == 'a')
        Donnee[i] = received;
      while( != ';');
  Pause = atoi(Donnee);

Have a look at Serial Input Basics - updated