Talking to my computer through Serial

If I type in "how are you?"
the computer responds "just fine thank you"

The below page has the functions you can use to extract information from your captured string. You might use the (readString.indexOf("ow are you?") to see if the string contains "how are you?" similar to the bottom code.

          ///////////////////// control arduino pin
          if(readString.indexOf("on") >0)//checks for on
          {
            myservo.write(40);
            digitalWrite(5, HIGH);    // set pin 5 high
            Serial.println("Led On");
          }
          if(readString.indexOf("off") >0)//checks for off
          {
            myservo.write(140);
            digitalWrite(5, LOW);    // set pin 5 low
            Serial.println("Led Off");
          }
          //clearing string for next read
          readString="";