EasyManuals Logo

Espressif ESP8266 User Manual

Espressif ESP8266
51 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #27 background imageLoading...
Page #27 background image
30
31
Serial.print("connecting to ");
32
Serial.println(host);
33
34
//
Use WiFiClient class to create TCP connections
35
WiFiClient client;
36
const int httpPort = 80;
37
if (!client.connect(host, httpPort)) {
38
Serial.println("connection failed");
39
return;
40
}
41
42
//
We now create a URI for the request
43
String url = "/guide/";
44
45
Serial.print("Requesting URL: ");
46
Serial.println(url);
47
48
//
This will send the request to the server
49
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
50
"Host: " + host + "\r\n" +
51
"Connection: close\r\n\r\n");
52
53
unsigned long timeout = millis();
54
while (client.available() == 0) {
55
if (millis()
-
timeout > 5000) {
56
Serial.println(">>> Client Timeout !");
57
client.stop();
58
return;
59
}
60
}
61
62
//
Read all the lines of the reply from server and print them to Serial
63
while(client.available()){

Other manuals for Espressif ESP8266

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP8266 and is the answer not in the manual?

Espressif ESP8266 Specifications

General IconGeneral
Digital I/O Pins17
Analog Input Pins1
Wi-Fi802.11 b/g/n
Operating Voltage3.0V - 3.6V
Clock Speed80 MHz / 160 MHz
Operating Temperature-40°C to 125°C
Dimensions24mm x 14mm
ProcessorTensilica L106 32-bit micro controller

Related product manuals