ESP8266WebServer server(80);
///IPAddress myIP; // IP address in your local wifi net
IPAddress myIP(10,0,1,20);
IPAddress gateway(10,0,1,10);
IPAddress subnet(255,255,255,0);
const char * ssid = "Epaper";
const char * password = "testing";
void setup(void) {
Serial.begin(9600);
/// WiFi.mode(WIFI_STA);
WiFi.mode(WIFI_AP);
/// WiFi.begin(ssid, password);
//Static IP setting---by Lin
wifi_station_dhcpc_stop();
struct ip_info info;
IP4_ADDR(&info.ip, 192, 168, 0, 189);
IP4_ADDR(&info.gw, 192, 168, 0, 0);
IP4_ADDR(&info.netmask, 255, 255, 255, 0);
wifi_set_ip_info(STATION_IF, &info);
WiFi.softAPConfig(myIP, gateway, subnet);
WiFi.softAP("testSSID");
// Connect to WiFi network
/* ///
Serial.println("");
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
*/
// SPI initialization
pinMode(CS_PIN , OUTPUT);
pinMode(RST_PIN , OUTPUT);
pinMode(DC_PIN , OUTPUT);
pinMode(BUSY_PIN, INPUT);
SPI.begin();
// Wait for connection
/* ///
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
*/