That just wait for connect event, don’t run anything next, make sure it is simple and work first.
After it work, you can add or modify anything you want.
Right now as I see:
- Pull the EN pin to low while the module is active is not good. Just need to low → high once when the module reset or enter sleep mode.
- WiFi.Scan(): I am not sure but this is for client mode, the module may switch to client mode automatically, no more AP mode.
- You need AP address: Here I set to 192.168.0.200, your phone should be 192.168.0.201.
The Winc15x0Interface()… may cause issue if called after enable(). I remember we fixed this issue but as recommend, try use before enable().