Hello everyone I am trying to get my head around micropython. I have a webpage created using HTML and CSS that I want to put on the NodeMCU I have, But I cant seem to find a good tutorial on how to do it. I can find plenty of tutorials on how to blink a LED, but nothing in depth using HTML/CSS. Can anyone point me in the right direction?
Thanks.
Marz.
Web server with HTML and CSS
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Web server with HTML and CSS
A search on "web framework" in this forum will reap dividends.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Web server with HTML and CSS
I haven't had a chance to look at what's available recently... but I have been upgrading to uasyncio 2.0 and did have a script that may help...
First you have to install some dependencies... when you get to a REPL prompt and the ESP8266 device is connected to the Internet...
It will install the code to the /lib folder of the flash file system.
Then try importing the attached script (after putting some content in /wwwroot)...
It's a pretty basic script... I'm sure someone has a much better take on the problem. Try searching github...
First you have to install some dependencies... when you get to a REPL prompt and the ESP8266 device is connected to the Internet...
Code: Select all
import upip
upip.install('micropython-uasyncio')
upip.install('micropython-logging')
upip.install('micropython-pkg_resources')
Then try importing the attached script (after putting some content in /wwwroot)...
It's a pretty basic script... I'm sure someone has a much better take on the problem. Try searching github...
- Attachments
-
- http.zip
- (1.09 KiB) Downloaded 482 times