can i save this firebase config on sd card and then on booting process esp8266 read config from sdcard? #define USER_EMAIL "user@email.com" #define USER_PASSWORD "mypassword123" #define STORAGE_BUCKET_ID "mybucket.appspot.com" #define DATABASE_URL "default-rtdb.firebaseio.com/"
so the goal is when we change the firebase configuration at any time, there is no need to do hard programming, just change the configuration stored in the SD card file.
You can store those strings and restore them into variables and use those variables in your code but #define is a pre compiler directive and is not something you can do at run time.
No that will not work because the compiler can not know what is in the file at compile time.
The pre compiler substitutes your #define before it compiles the source into code.
You can store those strings and restore them into variables and use those variables in your code but #define is a pre compiler directive and is not something you can do at run time.
I try to do your suggestion. so far that i can do to make a program like this.
Doesn’t look like you actually saved text in that file. How was it written?
That won’t work anyway because it needs to know where in the memory the callback function is and it is not known until after compile time, and it will change with every new code.