r-downing / PersWiFiManager

Persistent WiFiManager Arduino library for ESP8266
http://ryandowning.net/PersWiFiManager/
MIT License
111 stars 34 forks source link

PersWiFiManager without SPIFFS #34

Open arlaor opened 4 years ago

arlaor commented 4 years ago

Hi @r-downing

What modifications should I implement in order to use your library without the use of SPIFFS, including the HTM pages directly in the sketch? The idea is to divide the LED control functions in one tab, OTAupdate in another tab and PersWiFiManager in another tab

r-downing commented 4 years ago

Take a look in the cpp file, there's an optional define for WIFI_HTM_PROGMEM . If you define that, it stores the whole html page in progmem and serves it from that, and you can modify that as needed

https://github.com/r-downing/PersWiFiManager/blob/master/PersWiFiManager.cpp

On Tue, May 26, 2020, 10:45 AM Arturo notifications@github.com wrote:

Hi @r-downing https://github.com/r-downing

What modifications should I implement in order to use your library without the use of SPIFFS, including the HTM pages directly in the sketch? The idea is to divide the LED control functions in one tab, OTAupdate in another tab and PersWiFiManager in another tab

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/r-downing/PersWiFiManager/issues/34, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKJRO33ALTUJUP56YSMNSDRTPIXDANCNFSM4NKL54LQ .

arlaor commented 4 years ago

@r-downing So the idea would be to write inside the .cpp file all the htm code of my project plus the one found in the pages wifi.htm and index.htm of the folder data of your library?

arlaor commented 4 years ago

Hi @r-downing I have used the example basic_rest_api.ino and I have declared within PersWiFiManager.cpp the line #define WIFI_HTM_PROGMEM but there is no launch of the page that is inside the PersWiFiManager.cpp file Is there any extra line that needs to be added for proper operation?

r-downing commented 4 years ago

In your case you would want to add a link to the wifi.html in your main page like so:

https://github.com/r-downing/PersWiFiManager/blob/master/examples/basic_rest_api/data/index.htm#L24

On Wed, May 27, 2020, 10:52 AM Arturo notifications@github.com wrote:

Hi @r-downing https://github.com/r-downing I have used the example basic_rest_api.ino and I have declared within PersWiFiManager.cpp the line #define WIFI_HTM_PROGMEM but there is no launch of the page that is inside the PersWiFiManager.cpp file Is there any extra line that needs to be added for proper operation?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/r-downing/PersWiFiManager/issues/34#issuecomment-634714946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKJROYN47H7IZJL5STTK73RTUSJ3ANCNFSM4NKL54LQ .

arlaor commented 4 years ago

Hi @r-downing

https://github.com/r-downing/PersWiFiManager/blob/master/examples/basic_rest_api/data/index.htm#L24

But that would imply using SPIFFS and having in the sketch a page with all the 3 tabs mentioned and loading the wifi.htm page found in the flash space in one of the tabs?