After powering up your Pico W, your server will begin running on your static IP address. Access your HTML webpage by opening a browser and navigating to the IP address. You can confirm your IP address by checking the OLED connected to the Pico W.

You should see your HTML code displayed in your browser window. The temperature reading from the DS18B20 will be shown towards the top of the screen.

Click the LED ON and LED OFF buttons on the webpage to turn the Pico W's onboard LED on and off.

Click the PARTY! button on the webpage to start and stop the party parrot animation on the OLED. The slow change RGB LED will also turn on and off.

Going Further

You can adapt this code to suit your project needs. You can change the look of the HTML page by changing the CSS styling or change the CircuitPython portion to control a relay or log multiple sensors around your home. For more information on the CircuitPython HTTPServer library, be sure to check out the library documentation on Read the Docs.

This guide was first published on Nov 09, 2022. It was last updated on Mar 04, 2024.

This page (Usage) was last updated on Nov 01, 2022.

Text editor powered by tinymce.