ESP configuration mode on startup button click
Posted: Wed Dec 30, 2015 5:15 pm
Hi everybody,
I, as all other here, play with ESP8266 for the Home Automation. I need to have a 'configuration' mode on the different nodes activated somehow. It will be used for general configs like WiFi settings, MQTT setup and etc.
One of the options, I have seen and used in LUA script is to wait for a button click within 5 sec from the powering of the esp in which case an AP and Web Server would be fired, otherwise, a normal execution is started.
In LUA I used a timer of 5 secs that at the end checked if the button has been pushed at least once within that period and if so, I run the 'config.lua' script, otherwise I run the 'main.lua' .
I want to implement similar behavior but in ESP-Arduino C code, as I don't want to run a whole AP and a Web Server all the time when it's needed once a year.
Anyone that could help with at least a working idea is welcome.
BTW if anyone has an alternative idea, it's welcome as well
Thanks,
Boyan.
I, as all other here, play with ESP8266 for the Home Automation. I need to have a 'configuration' mode on the different nodes activated somehow. It will be used for general configs like WiFi settings, MQTT setup and etc.
One of the options, I have seen and used in LUA script is to wait for a button click within 5 sec from the powering of the esp in which case an AP and Web Server would be fired, otherwise, a normal execution is started.
In LUA I used a timer of 5 secs that at the end checked if the button has been pushed at least once within that period and if so, I run the 'config.lua' script, otherwise I run the 'main.lua' .
I want to implement similar behavior but in ESP-Arduino C code, as I don't want to run a whole AP and a Web Server all the time when it's needed once a year.
Anyone that could help with at least a working idea is welcome.
BTW if anyone has an alternative idea, it's welcome as well
Thanks,
Boyan.