[update] Make SSID unique with last 4 MAC digits.
This commit is contained in:
+5
-1
@@ -597,7 +597,11 @@ void setup() {
|
|||||||
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
|
FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
|
||||||
FastLED.setBrightness(currentBrightness);
|
FastLED.setBrightness(currentBrightness);
|
||||||
pinMode(ENC_SW, INPUT_PULLUP);
|
pinMode(ENC_SW, INPUT_PULLUP);
|
||||||
WiFi.softAP(WIFI_SSID, WIFI_PASSWORD);
|
WiFi.mode(WIFI_MODE_AP);
|
||||||
|
String apMac = WiFi.softAPmacAddress();
|
||||||
|
apMac.replace(":", "");
|
||||||
|
String ssid = String(WIFI_SSID) + "-" + apMac.substring(apMac.length() - 4);
|
||||||
|
WiFi.softAP(ssid.c_str(), WIFI_PASSWORD);
|
||||||
server.on("/", handleRoot);
|
server.on("/", handleRoot);
|
||||||
server.on("/save", HTTP_POST, handleSave);
|
server.on("/save", HTTP_POST, handleSave);
|
||||||
server.begin();
|
server.begin();
|
||||||
|
|||||||
Reference in New Issue
Block a user