Skip to content

A fast webserver using Micropython for the Pi Pico W. HTTPs support. Auto connect to Wifi, SD card support and RTC update on start. Support for Multicore soon!

Notifications You must be signed in to change notification settings

MrJackus1/Micropython-Pi-Pico-Web-Server

Repository files navigation

Micropython Pi Pico Web Server

A fast webserver for Pi Pico W running Micropython. HTTPs support!

Pi Pico Webserver

A webserver made with Micropython for Pi Pico W boards. It can handle requests and serve: files, .js, .css, etc over http and https. In the future i want to expand this into serveral servers such as ones for: http, https and a multithreaded server / versions of them.

How to install and run Pi Pico Webserver

  • Use V1.5 if you want HTTPs. I have included a certificate and a key. You should generate your own using 'openssl'. Place the two .DER files in the root of your pico or the root of the SD.
  • Open web_server.ini in notepad and edit the contents with your setup requirements. SD card doesnt have to be filled out if set to false. SDcard support is optional. If you want to use it please download 'sdcard.py' from the repository below. Copy the sdcard.py to the root of your pico, or build a custom Micropython build and add it in. Edit the .ini so that sdcard is set to true and you tell the server what pins it is connected to.
  • Copy 'Pico_Webserver_v1.5.py', 'update_rtc_time.py', 'web_server.ini', 'your_website_folder' and your 'key.DER' / 'cert.DER' to the root of your Pico W. If using an sdcard only 'your_website_folder' is on the sd.
  • Run 'Pico_Webserver_1.5.py', change the name to 'main.py' if you want to run on start.

Release Notes

Version 1.5

  • Now with HTTPs support.

Version 1.2

Version 1.1

  • Settings.ini support. Now allows the user to add their Wifi and webserver settings without having to change the pico_webserver.py (Allows the program to be used with mpy-cross!)
  • Added in some garbage collection.
  • Set WIFI powermode to full power. Improves request response times massively! (Maybe will be a setting in the ini soon. Trades power usage of the WIFI chip for improved networking capability.)

Version 1

  • Basic file and folder support
  • Favicon support, please use small favicons as they stay loaded in the memory, this speeds up the browser request for it.
  • http support
  • Easy to intergrate function support. Connect to your pico and use 'http:/your-pico-ip-here/pico', 'http://192.168.10.88/pico' for an example.

About

A fast webserver using Micropython for the Pi Pico W. HTTPs support. Auto connect to Wifi, SD card support and RTC update on start. Support for Multicore soon!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published