You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to switch back and forth between connecting to an existing network or running a softAP in the arduino code? I'm interested in having a softAP landing page after programming where you can specify a network ssid and password. Once that is stored, have the device try to connect to that network as a client instead. If for any reason that fails, after so many attempts or a given period of time go back to softAP mode and the configuration page again until the information is again changed.
Someone in the ESP8266.com forums said it was possible with the .mode() method, but didn't say anything else so I'm not sure what all needs to be done. (i.e. does the old instance handle need to be re-initialize in any way? Do I have to 'shut down' one before starting the other in some way, etc)
Basic Infos
Hardware
Hardware: ESP-12 / nodemcu
Description
Problem description
Settings in IDE
Module: NodeMCU v0.9
CPU Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu
The text was updated successfully, but these errors were encountered:
I believe the functionality you are looking for is already provided by great WiFiManager.
I would check it out before implementing on my own. WiFiManager should provide the best insight into nuances of changing the modes, etc. For instance you may face problems to establish connection if using SDK 1.5.3 (core 2.3.0) as documented here.
If you like to start testing on your own this is also great and below is quick and rough summary.
In NodeMCU, a simple way is to use the FLASH button(D3) as a reset( or mode switch ) button,
you can count the times of pushed or count hold time with digitalRead(D3) ( exmaple http://playground.arduino.cc/Code/HoldButton) to determine the trigger of mode change.
Is it possible to switch back and forth between connecting to an existing network or running a softAP in the arduino code? I'm interested in having a softAP landing page after programming where you can specify a network ssid and password. Once that is stored, have the device try to connect to that network as a client instead. If for any reason that fails, after so many attempts or a given period of time go back to softAP mode and the configuration page again until the information is again changed.
Someone in the ESP8266.com forums said it was possible with the .mode() method, but didn't say anything else so I'm not sure what all needs to be done. (i.e. does the old instance handle need to be re-initialize in any way? Do I have to 'shut down' one before starting the other in some way, etc)
Basic Infos
Hardware
Hardware: ESP-12 / nodemcu
Description
Problem description
Settings in IDE
Module: NodeMCU v0.9
CPU Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu
The text was updated successfully, but these errors were encountered: