Skip to content

Repository files navigation

🐭 Welcome to Raspberry Pi Pico W MicroPython WebServer

Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.


                                                                        ― Martin Fowler, Refactoring

Table of Contents

📜 Description

Simple Raspberry Pi Poco W web server coded using MicroPython on Thonny. The program runs on the BT Pico Gpio Sensor Expansion Board For Raspberry Pi Multiple Functional Interfaces board.

💻 Development Platform

Program is coded on Thonny using MicroPython. I have tested on both MacBook Air and Raspberry Pi 5 running Thonny.

  1. Open Thonny and upload all the files in the repository onto Raspberry Pi Pico W. Program is using MicroPython.
  2. Open the file main.py
  3. Modify the line in main.py with your own WiFi SSID and password.
   # Set up connection to WiFi
   ssid = 'your own wifi ssid'
   password = 'your own wifi password'
  1. Run main.py
  2. Example:
       MPY: soft reboot
       Connected
       ip = 192.168.0.21
       listening on ('0.0.0.0', 80)
       [2025, 12, 29, 0, 4, 48, 26, 0]
       (2025, 12, 29, 0, 12, 48, 26, 0)
       (2025, 12, 29, 0, 12, 48, 26, 0)
       Start time 2025-12-29 12:48:26
  1. Open web browser and type in the following: http://192.168.0.21 (make sure it is not https)
  2. The following screen will be shown on the web browser:

11. Functions & Features are:
LED ON - Turn Pico W board LED ON
LED OFF - Turn Pico W board LED OFF
READ SENSOR - Acquire reading from Temperature, Humidity, Microphone and Proximity sensors
IMAGE DUMP - Still under development
  1. More to come

💾 Software Development:

This program is written in MicroPython:

  • Following are the GPIO connection for various sensors:
# Board Pin assignment for this program
# P28 - DHT temperature and humidity sensor
# P27 - sound sensor module (ADC)
# P16 - servo motor control (PWM)
# P22 - buzzer (PWM)
# P20 & P21 - oled display (I2C0)
# P03 & P02 - ultrasonic distance sensor (P03 - Trigger, P02 - Echo)

📱 Platform tested:

I have tested my code on:

  • Raspberry Pi Pico W and a web browser (Chrome, Firefox,Safari)

☕ Buy Me a Coffee

If you appreciate my work, do support me by...
Buy Me A Coffee

📃 License

This program is licensed under the GNU General Public License v3.0 
Permissions of this strong copyleft license are conditioned on making  
available complete source code of licensed works and modifications,  
which include larger works using a licensed work, under the same  
license. Copyright and license notices must be preserved. Contributors  
provide an express grant of patent rights.

See the GNU General Public License for more details.

💬 Feedback and Suggestions

For any feedback or suggestions, feel free to contact me via email:
📧 chanlhock@gmail.com 🐭

About

Simple Raspberry Pi Poco W web server using MicroPython on Thonny

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages