-->
Page 1 of 1

Change SSID every couple of seconds?

PostPosted: Wed Jun 19, 2019 5:33 am
by pablopablo
Hi all,

I've been playing around with SpaceHuhn's project where you can have 50 ssids at the same time:

https://github.com/spacehuhn/esp8266_be ... onSpam.ino

However, I wanted to ask how I could instead of having 50 at the same time, iterate through the 50 every 10 seconds?

I'm assuming that I would loop through the array with all of the ssids but not sure how to do this or where to put it.

Actually, maybe an easier way for me to understand this would be to work on something smaller like this:

#include <ESP8266WiFi.h> // Include the Wi-Fi library

const char ssids[ ] Test = {"ESP8266 Access Point","Another Access point", "And another Access point;" }; // The name of the Wi-Fi network that will be created
const char *password = "thereisnospoon"; // The password required to connect to it, leave blank for an open network

void setup() {
Serial.begin(115200);
delay(10);
Serial.println('\n');

WiFi.softAP(ssid, password); // Start the access point
Serial.print("Access Point \"");
Serial.print(ssid);
Serial.println("\" started");

Serial.print("IP address:\t");
Serial.println(WiFi.softAPIP()); // Send the IP address of the ESP8266 to the computer
}

void loop() { }


So what I would like to do here is for the array TEST is to be called every 10 seconds and for one of the names to be used, followed 10 seconds later by another name

Any suggestions would be great!

Re: Change SSID every couple of seconds?

PostPosted: Wed Jun 19, 2019 6:57 am
by pablopablo
Well this is embarrassing

I actually asked the same question here a few months ago :roll:

viewtopic.php?f=160&t=19177

And got an answer (which I never replied to), so bad form on my part and thanks to @torntrousers for their help.

Apologies mods and everybody else!

Re: Change SSID every couple of seconds?

PostPosted: Wed Jun 19, 2019 7:07 am
by rudy
:D Thanks for the early morning laugh. I was struggling with some code and getting a little worked up. And your post helped relieve some tension.

Now back to the code.