[add] Wifi password
This commit is contained in:
+13
-3
@@ -327,9 +327,19 @@ void setup()
|
|||||||
FastLED.setBrightness(current_brightness);
|
FastLED.setBrightness(current_brightness);
|
||||||
pinMode(ENC_SW, INPUT_PULLUP);
|
pinMode(ENC_SW, INPUT_PULLUP);
|
||||||
|
|
||||||
WiFi.softAPConfig(IPAddress(192, 168, 4, 1), IPAddress(192, 168, 4, 1), IPAddress(255, 255, 255, 0));
|
WiFi.disconnect(true); // Clear old settings
|
||||||
WiFi.softAP("Connect4-Config", WIFI_PASSWORD, 1, 0, 4); // SSID, Pass, Channel 1, Hidden 0, Max Connections 4
|
WiFi.mode(WIFI_AP); // Force Access Point mode
|
||||||
WiFi.softAP("Connect4-Config");
|
delay(100); // Give the radio a moment to reset
|
||||||
|
|
||||||
|
// SSID, Password (MUST be 8+ chars), Channel, Hidden (0=No), Max Clients
|
||||||
|
if (WiFi.softAP("Connect4-Config", WIFI_PASSWORD, 1, 0, 4))
|
||||||
|
{
|
||||||
|
Serial.println("WPA2 AP Started Successfully");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Serial.println("AP Failed - Check if WIFI_PASSWORD is at least 8 characters!");
|
||||||
|
}
|
||||||
|
|
||||||
server.on("/", handleRoot);
|
server.on("/", handleRoot);
|
||||||
server.on("/save", HTTP_POST, handleSave);
|
server.on("/save", HTTP_POST, handleSave);
|
||||||
|
|||||||
Reference in New Issue
Block a user