I’m quite new to arduino and esp8266. Currently I’m trying a simple thing – connect arduino UNO to wifi network using ESP8266 and read a webpage from the internet.
I’m using the AT firmware on ESP8266. I can connect it to wifi and open a TCP connection to web server, pass the URL I want to receive, but I have the following problem:
while (Serial.available()){
char c = Serial.read();
dbgSerial.write(c);
strReceived+=c;
}
This gives me exactly what I need to my debug console – the whole HTTP response together with the content. The moment I comment out the debug output to soft serial, I only get very little data from the server. When I add a delayMicroseconds(50) after Serial.read(), I get a little more data to strReceived, but never as much as when I use the serial debug.
while (Serial.available()){
char c = Serial.read();
strReceived+=c;
delayMicroseconds(50);
}
dbgSerial.println(strReceived);
the above code gives me some data, but never the whole HTTP reply (header and page itself), usually some characters are missing.
any advice?
AT+GMR output:
AT version:0.21.0.0
SDK version:0.9.5
thank you very much