Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By martinayotte
#34202 This is a bit strange, because in one of my sketches, I'm using this piece of code to change STA from a Web page with a dropdown menu for the SSID and password input along with Save button :

Code: Select allvoid connectWifi(const char *ssid, const char *password)
{
  Serial.print("Connecting to ");
  Serial.println(ssid);
  WiFi.mode(WIFI_AP_STA);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected !");
  showIP(Serial);
}
User avatar
By diffstorm
#34308 It is really strange because it happens when I run this line below in loop()
Code: Select allanalogWrite(5, 100);

If I comment this line (analogWrite) it works, it can change mode.
If I put it again, it crashes on the WiFi.mode or WiFi.begin lines...

I cannot find why..