-->
Page 1 of 12

Webpage not on SD-Card but in Flash?

PostPosted: Thu Aug 06, 2015 6:24 pm
by brutzler
Hi,
using a nodemcu (with a lot of memory) as a webserver, my thoughts are to hold the webpage in the flash.
I know the way (arduino uno with ethernet-shield) to make a little webserver, holding the html-code on a sd-card. But I do not want to use one.
And I earlier made stuff like this:
Code: Select all          client.println(F("HTTP/1.1 200 OK"));
          client.println(F("Content-Type: text/html"));
          client.println(F("Connnection: close"));
          client.println()....;

But its very hard to "convert" a HTML-Page to this client.println structure.
Does anybody know an easy way?
My aim is, to setup a HTML-Page with a "normal" HTML-editor, and then convert it somehow easy to get it on the ESP8266.

Re: Webpage not on SD-Card but in Flash?

PostPosted: Thu Aug 06, 2015 6:53 pm
by martinayotte
Igor (IGRR) has almost finish to add new version of SPIFFS into ArduinoIDE, although it is not released yet, it is on GitHub.
This will allow to have plain HTML files stored into Flash, and your sketch will be able to load it using file i/o functions, and server can send them to client.
(I will try the GitHub code in the following days)

Re: Webpage not on SD-Card but in Flash?

PostPosted: Fri Aug 07, 2015 5:37 pm
by brutzler
You have a link for me to try too?
Or how can I integrate this function in my IDE?

Re: Webpage not on SD-Card but in Flash?

PostPosted: Fri Aug 07, 2015 7:03 pm
by martinayotte
It is not bundled yet as an easy install, it is only available from GitHub, needing to merge files manually with ArduinoIDE, I've not get the chance to try it out yet (maybe over the weekend).
But if you are patient, IGRR will probably do a official release soon.