原文:https://blog.csdn.net/uyy203/article/details/51048292
while(Serial.available()>0)
WifiSerial.write(Serial.read());
while(WifiSerial.available()>0)
Serial.write(WifiSerial.read());
............
while (1)
{
if (WifiSerial.available()>0)
{
char c = WifiSerial.read();
data += c;
}
if (data.indexOf("done")!=-1)
{
break;
}
}