Please see details below and let me know if I need to add something to make it only run as a wifi client and not also an AP!
Thanks in advance
-AL
Details: Arduino IDE 1.6.4
Generic ESP8266 Module 1.6.4-673-g8cd3697
Installed via instructions found on viewtopic.php?f=26&t=3094
Sample sketch the connects to an access point as client and also creates its own AP
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
const char* ssid = "MY_ROUTER";
const char* password = "MY_PASSWD";
const String html = "<html><head></head><body>Hello World</body></html>";
ESP8266WebServer server(80);
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
Serial.print("\n\r \n\rWorking to connect");
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
server.on("/", handle_root);
server.begin();
Serial.println("HTTP server started");
}
void loop() {
server.handleClient();
}
void handle_root() {
Serial.println("Root page called");
server.send(200, "text/html", html);
delay(100);
}