Post topics, source code that relate to the Arduino Platform

User avatar
By trendchaster
#29012 Hello gregf,
Can you provide the source file for same.Me too working on this.

I have multiple IOT devices that start as access points on reset so that the user can configure the device (including SSID/PWD) without having to hardcode the info, and then connect to the home wifi once configured.[/quote]
User avatar
By martinayotte
#38769 Simply use the following piece of code in Setup() :

Code: Select all  const char* ssid     = "YourWifiAPRouter";
  const char* password = "xxxxxxxxxxxxxxx";
  WiFi.mode(WIFI_AP_STA);
  WiFi.begin(ssid, password); 
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");