Created
July 11, 2016 22:33
-
-
Save r3wald/d09304a7575e0a2f62e6a981adfc286b to your computer and use it in GitHub Desktop.
create random access points with an ESP-8266
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ESP8266WiFi.h> | |
void setup() { | |
Serial.begin(115200); | |
delay(500); | |
} | |
void loop() { | |
int r = random(0, 9999); | |
char ssid[50]; | |
sprintf(ssid, "WLAN-%04d", r); | |
Serial.print("ssid: "); | |
Serial.println(ssid); | |
WiFi.softAP(ssid); | |
IPAddress myIP = WiFi.softAPIP(); | |
Serial.print("ip: "); | |
Serial.println(myIP); | |
delay(1000 * 60); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment