title: how to compare array of chars with arduino
body: <p>i want to compare the text that i receive from gsm board in arduino with the word Misure and Reset and reply in different case depending on request but the arduino jump on ams.flush() without reply nothing. please help me thanks </p>
  
  <pre><code>//Message REceiving
  void receivemsg(float temperature){
   char c;
      char d[200];
      int i;
  
  
    {
      Serial.println("Message received from:");
  
      // Get remote number
      sms.remoteNumber(senderNumber, 20);
      Serial.println(senderNumber);
  
      // An example of message disposal    
      // Any messages starting with # should be discarded
      if(sms.peek()=='#')
      {
        Serial.println("Discarded SMS");
        sms.flush();
      }
  
      // Read message bytes and print them
      while(c=sms.read()){
         d[i]=c;
        Serial.print(c);
  //      for (i=0;i&lt;200;i++){
  //      d[i]=c;}
  }
            Serial.println("\nEND OF MESSAGE");
  
  
        // interpreter of the message
        for (i=0;i&lt;200;i++){
        if (d[i]=='Misure')
        // part of reply message 
        {
  
  
   String t="Hello i'm Arduino: Umidità del terreno attuale (0-50): "+ String(sensorValue);
   String f= " Temeratura attuale: ";
   String d= ftoa(temperature,2,6);
  
  String txt=t+f+d;
   char txtMsg[200];
   txt.toCharArray(txtMsg,140);
    sms.beginSMS(senderNumber);
    sms.print(txtMsg);
    sms.endSMS(); 
    Serial.println("\nCOMPLETE!\n");}}
  
        for (i=0;i&lt;200;i++){      
  if (d[i]=='Reset'){
      char txtMsg[200]={"Reset Received... i'm resetting now please be patient thanks"};
      sms.beginSMS(senderNumber);
      sms.print(txtMsg);
      sms.endSMS();
      Serial.println("\nCOMPLETE!\n");
       //calling watchdog
        Reset_AVR();}}
  
  
      // Delete message from modem memory to prevent full  memory space error
      sms.flush();
      Serial.println("MESSAGE DELETED");
    delay(1000);
    return;
  }}
  </code></pre>