Change IP and port in AP mode
Posted: Mon Jan 02, 2017 7:02 pm
I want to control ESP-12 pins from android device. I create simple app that connect to ESP-12 and then send a string to ip (192.168.56.1) and port 900. I write below code but seem's not work correctly.
How to change IP and port in AP mode?
How to receive string ?
my code
How to change IP and port in AP mode?
How to receive string ?
my code
Code: Select all
#include <ESP8266WebServer.h>
//************************************
String LED;
String LED_mod;
//************************************
const char *ssid = "kc_test";
const char *ip = "192.168.54.1";
ESP8266WebServer server(900);
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
Serial.print("Configuring access point...");
WiFi.softAP(ssid);
IPAddress myIP = WiFi.softAPIP();
Serial.print("AP IP address: ");
Serial.println(myIP);
server.begin();
//************************************
pinMode(12, OUTPUT);
}
void loop() {
server.handleClient();
if (LED=="A"){ digitalWrite(12, HIGH); }
if (LED=="a"){ digitalWrite(12, LOW); }
}