I am using A6 module.. i only want to compare after at+cipsend...with all commands are giving me a OK response..i compared this with "ok" string that is working and after that i need to empty that string otherwise string size would be a more...
void ShowSerialData()
{
while(SIM900.available()!=0) {
val=char (SIM900.read());
readstr+=val;
if(val=='\n'){
Serial.println(readstr);
if (readstr == "OK\r\n"){
Serial.println("String sent");
}
readstr="";
}
}
}
in loop code:
Serial.print("AT+CIPSEND\\r\\n");
SIM900.println("AT+CIPSEND"); /* Send data through TCP connection */
delay(2000);
ShowSerialData();