Serial input into an array

Hi all,

I want to create an array of 9 bytes of 8 bits from the serial input. The input is in the form of ascii so i was the have to used char. I want to constantly place this information into a array with every new 9 bytes. Thecodei have at the minute is below

  char str[9] = {'\0'};

if (Serial.available()>=9){
 for (byte i = 0; i < 9; i++){
   str[i] =;


Everything you need to know about serial input. Serial input