Skip to content

Instantly share code, notes, and snippets.

@sanfx
Created May 25, 2020 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanfx/86f98516bf95ccaa81322976bce7ed39 to your computer and use it in GitHub Desktop.
Save sanfx/86f98516bf95ccaa81322976bce7ed39 to your computer and use it in GitHub Desktop.
function returns nearby visible wifi hotspots
String* getWifiHotspots() {
// String* arr = new String[];
String arr[100];
Serial.print("Scan start ... ");
int n = WiFi.scanNetworks();
for (int i = 0; i < n; i++)
{
arr[i] = WiFi.SSID(i).c_str();
}
return arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment