Newbie WeMos D1 WiFi Uno: Can't communicate from iPhone

when I run your code it connects to the WiFi and I can connect a web browser to 192.168.1.94 and switch the LED on/off OK
check your LED connection it is D7

int ledPin = D7;

try updating setup() to

void setup() {
  Serial.begin(115200);
  delay(10);
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);
  Serial.println();
  Serial.println("LedPin ");
  Serial.println(ledPin);
  // Connect to WiFi network
  Serial.print("Connecting to ");
  Serial.println(ssid);

  WiFi.begin(ssid, password);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
  Serial.println("");
  Serial.println("WiFi connected");

  // Start the server
  server.begin();
  Serial.println("Server started");

  // Print the IP address
  Serial.print("Use this URL : ");
  Serial.print("http://");
  Serial.print(WiFi.localIP());
  Serial.println("/");

}

to test the LED it blinks the LED while the WiFi is connecting

1 Like