MqttClient mqtt("192.168.1.8", 1883, msgRev);
I want to retrieve the IP address which is stored in spiffs and use it to declare this global object.
MqttClient mqtt(AppSettings.MQTTUWL, 1883, msgRev);
AppSettings contain the structure of spiffs.
Here is my init(),
void init()
{
spiffs_mount(); // Mount file system, in order to work with files
AppSettings.load();
//...
}
The problem is during the declaration of the object code, AppSettings is not yet loaded. How should I declare the global object such that it is able to retrieve the value from AppSettings?