Liz Clark and Kattni Rembor have put together a guide for setting up a web server on a Raspberry Pi Pico W, using the new support for the board's Wi-Fi capabilities in CircuitPython — and has celebrated the "PiCow" with a bovine-themed box to house the hardware.
"In this guide," Clark and Rembor explain, "you'll setup an HTTP (web) server with a Pico W running CircuitPython. HTTP servers are handy for creating custom web interfaces to monitor and control IoT projects. This example sets a static IP address for the server, logs temperature readings from a DS18B20 temperature sensor, displays server information on an OLED and serves an HTML webpage with buttons that can send HTTP POST requests to toggle pins on the Pico W."
The guide comes as CircuitPython, the educationally-focused MicroPython port, adds initial support for the Raspberry Pi Pico W — launched recently as a follow-up to the popular RP2040-based Raspberry Pi Pico, keeping the features and layout of its predecessor while adding a radio module, which enables currently-available Wi-Fi and maybe-in-the-future Bluetooth Low Energy (BLE) connectivity.
Rather than simply bring up a web page, though, the build goes a few steps further — adding an external temperature sensor, for more accurate readings than the RP2040's built in sensor, and an OLED display on which animations can be played under web control. For good measure, the hardware is housed in a cow-shaped 3D-printed chassis — a play on the "PiCow" nickname for the Raspberry Pi dev board.
The full guide, parts list, and source code are now available on the Adafruit Learn portal — along with 3D print files for the optional cow-case.