Hello! I tried with example INTERACTIVE WEB-BASED UI from tutorials on ESP8266-12 and it seems work OK. But when I changed draw and added some elements and html code grew to 8 kb after file convert, Espruino Web IDE could not to load it and wrote to me out of memory. When I ceased file it began to work partially with the same problem - out of memory. I do not attach code here because it almost the same as in example only the size of html part is bigger then on original. Is it so small limit on program code for ESP8266 ? Only 5 KiloBytes? I have Esp8266-12 with 4 Mb and run on 1.85 version of Espruino.
In the webIDE options, change the minifier to closure instead of... whatever the default is.
That minifier gets rid of all the newlines, so Espruino has to buffer the whole mess, AND the results of executing it. So it stops working at about half-full.
Your other problem could be because you're trying to send the whole HTML page at once - basically if you send the HTML straight down the socket in one go, Espruino needs the RAM for the HTML in the variable and for the HTML that's now in the socket's send buffer.
You can get around it by sending the string a bit at a time, or even just my using multiple files (eg put any JS in a separate JS file, and the same for CSS)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem