Hello!
I would like to know if somebody was able to make the excellent library microWebSrv or microWebSrv2 working on an ESP8266?
Sorry if question was already asked, but I can't get clear information saying that it's impossible.
I tried to copy the library, but got a memory error, the solution seems to be to build my own firmware with this library embedded inside (frozen).
That's ok, but I would like to know if somebody has made it before and have some feed backs about?
Maybe is there some other libraries I could try? What are you usually using for a very simple and light web server?
Other question around micropython:
The problem of importing the microWebSrv is a memory problem. If I do understand right, it is because of the micropython uses to much memory compiling the raw py code during the runtime.
So does it means that if I write a quite big python module (or script), it is required to be embed it in my own compiled firmware?
Does it means that the source code written in pure python can't exceed the ram of the device to avoid importing problems? Or am I all wrong?
Thank you
microWebSrv on ESP8266, and general question
Re: microWebSrv on ESP8266, and general question
esp8266 isn't on the MicroWebSrv2 list of supported platforms, and there are a few issues on the project github page that suggest it won't run.
Re: microWebSrv on ESP8266, and general question
Thank you for your answer,
Do you have any ideas about the second part of my question about the python scripts sizes?
Do you have any ideas about the second part of my question about the python scripts sizes?
Re: microWebSrv on ESP8266, and general question
I've written programs for the ESP8266 and have had to break them in to multiple pre-compiled modules. The act of compiling is the most significant issue when you're trying to load many things in to the ESP8266. If I recall it generally fails when you hit 100 lines of code. So for my projects today I mpy-cross compile them and then load the .MPY files in.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: microWebSrv on ESP8266, and general question
See this doc for information on freezing bytecode. Using this technique it is possible to install libraries comprising hundreds of lines of code and to run applications with plenty of free RAM.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.