Reading in serial data and using strcmp

Robin2:
I think it needs null terminated strings.

If you just want to compare a few characters maybe the simplest thing would be to write your own function.

...R

It is null terminated.

if(sentenceBegins) //store characters to buffer
    {
      buffer[index] = c;
      index++;
      buffer[index] = '\0';

Each increment adds the null termination. In this case, the null termination would be at buffer[5] when the strcmp happens.