Add a web control panel to your project - the web server

preview_player
Показать описание
Adding a web based control panel to your Micropython project allows you much easier monitoring and control of your device. Just pull up a web browser and interact with your project on a fully graphical user interface.

This is part one of a three part series. We'll build the web server code so that you can connect to your device, get it to decode your request, action it and then send back any data or code files that you need.

The tutorial uses a Raspberry Pi Pico W but any Micropython, WiFi enabled device will work.

Check out the project page on my main website at

Download the code from my GitHub repository

0:00 Introduction
2:24 How a web server handles requests
4:06 The HTTP request message
11:45 The RequestParser code
15:58 HTTP response message
19:40 The ResponseBuilder code
23:52 Decoding the request and actioning it
27:43 What's next
Рекомендации по теме
Комментарии
Автор

Very comprehensive.

Came across these a couple of months ago - definitely the best tutorials on the topic out there.
Only now getting the chance to try and put physically into practice.
Thank you for all the effort you put into this

tiagdvideo
Автор

Just came across this one late night coding. It's a lot more in depth and packed full of content than I thought, which is a welcome surprise by all means. Will be watching all the videos in order to better understand your flow, and how to get it working :)

Redstoneghost
Автор

Very helpful with micro Python, pico, W and socket set up!

gdglock
Автор

Excellent set of tutorials on Pico Pi web apps, thanks !

rd-tkjs
Автор

this is such a good tutorial, it should really be way more popular, thank you

brianjros
Автор

Micro python, wifi connection, pi pico W, socket, html, web page, request, Json..etc..Thank you
for making me, learn about all those interesting topics through the building process of this Web Control Interface.
I watched your 3 last video and appreciated your explanations on all of those. So far, I made everything
running on PI Pico and as well on an ESP32 (with some modifications for the WIFI connection).Regards.
Michel

michelpoisson
Автор

A new vid after all this time. Very nice

umutkayacan
Автор

Any idea why in ResponseBuilder *path, filename = req_filename.rsplit("/", 1)* returns *['index.html']* instead of *['', 'index.html']* ?

MattDvc
Автор

I have a strange problem. Hope you can help me on this. I have setup the Access Point, created a web page to get data using input boxes and served it. It works fine. However I dont get any input data from the computer browsers, opera, chrome, internet exproler, edge (on another computer). But my mobile on android 10 delivers it nicely. I have tried practically everything . But browsers on computer or laptop simply refuses to send data. I do get headers and strangly the content-length shows different numbers according to the data entered for submit. Any idea about this behavior ?

anithasshenoy
Автор

thanks for this video - really appreciate it. I have some background programming - just not web stuff so I was looking for something I could use as an interface for a few projects that I'm building on pico-w for home automation. Would I be able to use this as something that picks up readings from sensors running in an infinite loop and storing data variables in a main loop and displaying the status on the webpage? The whole 2 threads only on the pico means being more careful in paying attention to what is going on than I normally would!

Greeata
Автор

Your tutorials are very helpful. Can you please tell me what Editor/IDE you are using for these projects? I prefer VSCode, but have problems running my PICO-W projects from within that IDE. I installed the "PICO-W-GO" vscode extension, and several other extensions for code completion and live server. I also have tried Thonny, but it isn't nearly as elegant.
ANY suggestions would be much appreciated! Thank you

johncutler
Автор

Does this can be accessed remotely with other devices and wifi address?

ChylleSuu
Автор

This tutorial is super. Once I realized that I needed to download and install the postman desktop agent, I was able to get it working to send GET requests to the Pico as shown in the video. However, your video doesn't show the details of the POST request so I wasn't able to get that working. Can you show the URL of the POST request?

dougblanding
Автор

will somebody please make a video on how to do such things in c/c++ PLEASE?

danman
Автор

Would have been nice if this was done with C/C++. I have absolutely no use or love for "Python"! To me Python is like a car that has an 8 cylinder engine, but only runs on three, stuck in second gear, with the rear tires being flat! Otherwise your tutorial would have been great. SORRY! At 11:12, I ended it and went elsewhere.

dalesmith