Hello! as in object I've problem with wifimanager, I also try this:
PROCEDURE:
STEP 1:
Go to: My PC > Documents > Arduino > libraries > Espalexa > src < and Open up all three Files in the Folder named as:
"Espalexa.h"
"EspalexaDevice.h"
"EspalexaDevice.cpp"
in a Simple Text Editor or a Code Editor (I used Sublime Text).
STEP 2:
In File: "Espalexa.h":
Add Line:
void close()
{
server->close();
}
before the line:
~Espalexa(){delete devices;}
In File: "EspalexaDevice.h":
Add Line:
void EspalexaDevice::close()
{
}
at the End, after the function:
void EspalexaDevice::doCallback()
{
if (_callback != nullptr) {_callback(_val); return;}
if (_callbackDev != nullptr) {_callbackDev(this); return;}
if (_callbackCol != nullptr) _callbackCol(_val, getRGB());
}
In File: "EspalexaDevice.cpp":
Add Line:
void close();
Just after the Line:
uint8_t getLastValue();
STEP 3: Last Step!
Add Line:
espalexa.close();
just before you call the Config Portal.
Also Remember to add a reset function at the end or atleast the begin function for Espalexa.
i.e.:
espalexa.close();
WiFiManager wifiManager;
wifiManager.startConfigPortal();
ESP.reset(); // I would recommend this one than the one below.
Hello! as in object I've problem with wifimanager, I also try this: PROCEDURE: STEP 1: Go to: My PC > Documents > Arduino > libraries > Espalexa > src < and Open up all three Files in the Folder named as: "Espalexa.h" "EspalexaDevice.h" "EspalexaDevice.cpp" in a Simple Text Editor or a Code Editor (I used Sublime Text).
STEP 2: In File: "Espalexa.h": Add Line:
void close() { server->close(); } before the line:
~Espalexa(){delete devices;} In File: "EspalexaDevice.h": Add Line:
void EspalexaDevice::close() { } at the End, after the function:
void EspalexaDevice::doCallback() { if (_callback != nullptr) {_callback(_val); return;} if (_callbackDev != nullptr) {_callbackDev(this); return;} if (_callbackCol != nullptr) _callbackCol(_val, getRGB()); } In File: "EspalexaDevice.cpp": Add Line:
void close(); Just after the Line:
uint8_t getLastValue(); STEP 3: Last Step! Add Line:
espalexa.close(); just before you call the Config Portal. Also Remember to add a reset function at the end or atleast the begin function for Espalexa. i.e.:
espalexa.close(); WiFiManager wifiManager; wifiManager.startConfigPortal(); ESP.reset(); // I would recommend this one than the one below.
or
espalexa.close(); WiFiManager wifiManager; wifiManager.startConfigPortal(); espalexa.begin();
I've compile error!!