Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.
― Martin Fowler, Refactoring
- Description
- Development Platform
- Software Development
- Platform Tested
- Buy Me a Coffee
- License
- Feedback and Suggestions
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.
Program is coded on Thonny using MicroPython. I have tested on both MacBook Air and Raspberry Pi 5 running Thonny.
- Open Thonny and upload all the files in the repository onto Raspberry Pi Pico W. Program is using MicroPython.
- Open the file main.py
- 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'
- Run main.py
- 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
- Open web browser and type in the following: http://192.168.0.21 (make sure it is not https)
- The following screen will be shown on the web browser:
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
- More to come
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)
I have tested my code on:
- Raspberry Pi Pico W and a web browser (Chrome, Firefox,Safari)
If you appreciate my work, do support me by...
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.
For any feedback or suggestions, feel free to contact me via email:
📧 chanlhock@gmail.com 🐭

