Photon 2 on multiple wifi networks?

I was able to add a ssid with this code below in setup() running on a Photon 2 device os 5.6.0:

#if Wiring_WiFi //  check for feature
  WiFi.setCredentials("mySSID", "myPassword");

I try to run the code once then comment it out so it won't run on every startup.

Before I tested this, I came across this thread:

I thought this thread might be of interest, too. The P2 is mentioned and a link within about recommended ways to set credentials:

Hope this helps.

1 Like