So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By pablopablo
#80446
torntrousers wrote:also, the semantics of the for loop are subtly different than the original code I suggested so you also need to use just < instead of <= in the for loop, so
Code: Select allfor (i = 0; i < howManySsids; i++) {


Kicking myself!
User avatar
By pablopablo
#80447
pablopablo wrote:
torntrousers wrote:also, the semantics of the for loop are subtly different than the original code I suggested so you also need to use just < instead of <= in the for loop, so
Code: Select allfor (i = 0; i < howManySsids; i++) {


Kicking myself!



OK, this seems to be getting closer to what I am trying to do..thanks for your patience and apologies for my lack of clarity......

I now see another issue:

The former ssid is still visible when the new one comes up...I am wondering if it is possible to remove the former one before the next one appears...Basically, I would like for it to be seen as one sentence that 'plays' out over a few iterations...I've tried
Code: Select allwifi disconnect ()
but am wondering if there is something like a clear() funciton...here is updated code with wifi.disconnect()

Code: Select all#include <ESP8266WiFi.h>

String ssids[] = { “The Apple is on the table “, "Banana is on the floor“,  "Orange is everywhere“};
int howManySsids = 3;
 
void setup() {
  WiFi.persistent(false);
  WiFi.mode(WIFI_AP);
 
}

int i;

void loop() {
  for (i = 0; i<howManySsids; i++){
  WiFi.softAP(ssids[i].c_str());
  delay(2000);
  WiFi.disconnect();
}
}
User avatar
By torntrousers
#80449
pablopablo wrote:I now see another issue:

The former ssid is still visible when the new one comes up...I am wondering if it is possible to remove the former one before the next one appears...


I'm not sure that we can do anything about that from the ESP8266 end, I'm guessing its the remote client - your phone or PC -- that is caching the recent Wifi access points that its discovered and showing them its its list of SSID's. So all you can do is wait for the client timeout to drop them off its available SSID list.
User avatar
By pablopablo
#80457
I'm not sure that we can do anything about that from the ESP8266 end, I'm guessing its the remote client - your phone or PC -- that is caching the recent Wifi access points that its discovered and showing them its its list of SSID's. So all you can do is wait for the client timeout to drop them off its available SSID list.


Hey Torntrousers,

I figured as much...I'll keep playing around though :D

Thanks for the help!