Hello
can any one help me
how can run the css file and javascript file on the board esp8266
i building small webserver contain 3 html file and css file and javascript file
when i put the device in access point
the css file not loading or even the other html file or javascript
how i can create the link with micropython between the project pages
ESP8266 access point server
Re: ESP8266 access point server
Hello!
You will also need some sort of web server application to serve your page.
See here...
https://awesome-micropython.com/#web
HTH
You will also need some sort of web server application to serve your page.
See here...
https://awesome-micropython.com/#web
HTH
Re: ESP8266 access point server
i had do the same idea but throw arduino
i just write below senetce to make the server see and collect all other html and css js file
server.serveStatic("/",SPIFFS, "/");
in micropython we don't have the same ????
i just write below senetce to make the server see and collect all other html and css js file
server.serveStatic("/",SPIFFS, "/");
in micropython we don't have the same ????
Re: ESP8266 access point server
Even Arduino requires you to include some sort of web server.
Re: ESP8266 access point server
this wad my arduino code and the css file and js was working fine
server.serveStatic("/",SPIFFS, "/");
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", index_html, processor);
});
server.on("/temperaturec", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/plain", temperatureC.c_str());
});
server.on("/chart", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SPIFFS, "/chart.html");
});
server.on("/table", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SPIFFS, "/table.html");
});
// Start server
server.begin();
how can make it in micropython as all example on interent depending on simple webserver using function include html main code
in the main.py file
honestly i got tired i read alot alot
i hope to fine simple and easy solution
server.serveStatic("/",SPIFFS, "/");
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/html", index_html, processor);
});
server.on("/temperaturec", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/plain", temperatureC.c_str());
});
server.on("/chart", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SPIFFS, "/chart.html");
});
server.on("/table", HTTP_GET, [](AsyncWebServerRequest *request){
request->send(SPIFFS, "/table.html");
});
// Start server
server.begin();
how can make it in micropython as all example on interent depending on simple webserver using function include html main code
in the main.py file
honestly i got tired i read alot alot
i hope to fine simple and easy solution
Re: ESP8266 access point server
and for sure in socket library that already exist in micropython
they have sort of code to can load the css file and make routing for the website pages
they have sort of code to can load the css file and make routing for the website pages
Re: ESP8266 access point server
thank you bitninja
i make it
i make it
Re: ESP8266 access point server
thank you i do it
but i face another problem
javascript not work well on the server
always receive error [Errno 110] ETIMEDOUT
any suggestion
i use java to draw chart from 3000 record stored in the esp8266
can you advice library can do chart and produce pdf file and work on esp8266
but i face another problem
javascript not work well on the server
always receive error [Errno 110] ETIMEDOUT
any suggestion
i use java to draw chart from 3000 record stored in the esp8266
can you advice library can do chart and produce pdf file and work on esp8266