Datasheet
Dont forget to update
const char* ssid = "yourssid";
const char* password = "yourpassword";
to your access point and password, then upload the same way: get into bootload mode, then upload code via IDE
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
// We now create a URI for the request
String url = "/testwifi/index.html";
Serial.print("Requesting URL: ");
Serial.println(url);
// This will send the request to the server
client.print(String("GET ") + url + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
delay(500);
// Read all the lines of the reply from server and print them to Serial
while(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}
Serial.println();
Serial.println("closing connection");
}
© Adafruit Industries https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout Page 36 of 43