It works OK to a point. If the sketch spends too much time in the while loop (gaps in the data), the ESP apparently resets itself printing: " ets Jan 8 2013,rst cause:4, boot mode:(3,7) " plus a whole bunch of other stuff. Stuff that looks like the results of an AT-RST command.
You can see this by writing:
void setup(){
Serial.begin(115200); -- found this line is not even necessary as long as serial monitor is set to 115200 baud
while(1);
}
When you run this, you would expect the result to appear like a hung process with nothing printing to the serial monitor - but, every few seconds, it prints what I have indicated above, apparently going into the reset mode.
I also see this phenomenon by using the ESP as a client, connecting to a server and sending it data using WiFi.print("some string") commands.
If I do:
WiFi.print"abc");
WiFi.print("def");
all is OK. If I add a third statement:
WiFi.print("fgh");
maybe OK. But If I have a forth statement:
WiFi.print("ijk");
I always get the apparent reset and the sketch stops.
Can you tell me what is going on here and is there any way around it.
Thanks