So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By johntech2014
#78327 I'm experimenting with several Wemos boards using the Advanced Web Server example sketch.
When I load that sketch on the boards I notice the each one comes up with a different web address.
Is there a way to make the web address for all the boards static instead of dynamic?

What I'm trying to do is have all boards report to one main web page. If I am approaching this in
the wrong matter could you point me in the correct direction.

Thank you

John
User avatar
By rudy
#78328 Take a look at this.
https://arduino-esp8266.readthedocs.io/ ... tml#config

Code: Select allWiFi.disconnect(); 
 
IPAddress staticIP(192,168,100,122);
IPAddress gateway(192,168,100,254);
IPAddress subnet(255,255,255,0);

  Serial.printf("Connecting to %s\n", ssid);
  WiFi.begin(ssid, password);
  WiFi.config(staticIP, gateway, subnet);         //**************************
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  Serial.println();
  Serial.print("Connected, IP address: ");
  Serial.println(WiFi.localIP());