Simple Command Processing

Hello,

I am trying to write a arduino program that takes incoming commands via the serial window on the computer and then act upon those commands.  Right now all I care about is processing the commands and I am having trouble.  What I am doing is storing 7 bytes of the data into a char array that is 8 elements large.  The 8th element is for storing the end of string signifier 'n0'.  I got this information from the arduino site.  Once the command is obtained, I am printing the contents of the char array back to the serial window to confirm that the data is just like I typed it but the results are very strange and I dont understand what is going on. Here is the results I get if I type my name calvin into the serial window.  I also get that first character of   ÿ    right before the word ready when I show the serial window.  Very confused.  Any help would be awesome.

==========Results==========================

ÿReady

cÿÿÿÿÿÿ

alÿÿÿÿÿ

vÿÿÿÿÿÿ

inÿÿÿÿÿ

==========================================
================Here is my code==============
char command[8];
boolean readyFlag = false;
void setup()
{
  Serial.begin(115200);
}
void loop()
{
  if(Serial.available())
  {
    //Collect 7 bytes worth of the command
    for(int i = 0; i < 7; i++)
    {
      command[i] = Serial.read();
    }
    
    //Add the new line char to the end of the string
    command[7] = '\0';
    Serial.println(command);
  }
  if(readyFlag == false)
  {
    readyFlag = true;
    Serial.println("Ready");
  }
}
==========================================

yes i do. :smiley:

yes i do. :smiley: