create new tag
view all tags

The WEB server

When writing a WEB server for your sensors and actuators you have 3 possible options:

When writing a simplistic WEB Server, serving only static HTML pages then you may well write it yourself, making use of the uscocket library in MicroPython. If you want to use more complex pages e.g. using templates or you need dynamic pages e.g. to display incoming data from your sensors, then it may be easier to rely on work other people have prepared for you. On MicroPython two options are available:
  • picoweb: a very small WEB server sufficient for our purposes. Picoweb comes with many example programs demonstrating all the features of the WEB server. These examples are extremely useful when trying to implement your own code. You should have a close look at them and try them one by one. Only small modifications are needed to run them on our system.
  • microdot is very similar to picoweb, but offers documentation in addition.
Both frameworks are already included in your MicroPython interpreter.

-- Uli Raich - 2020-06-08


Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2022-11-12 - UliRaich
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback