With the Raspberry Pi Pico, you can measure temperature, humidity, and atmospheric pressure, while learning to interface with sensors. This is an excellent beginner-to-intermediate project for exploring sensor integration and data visualization.
Your weather station can:
Follow the official guide to install MicroPython on your Raspberry Pi Pico.
Using jumper wires and a breadboard:
If using the BMP280/BME280, connect via I2C (SCL/SDA pins).
Example script to read from a DHT22 sensor:
import dht
import machine
import time
sensor = dht.DHT22(machine.Pin(15))
while True:
sensor.measure()
temp = sensor.temperature()
hum = sensor.humidity()
print(f"Temp: {temp}°C Humidity: {hum}%")
time.sleep(2)
Run this and view the output via Thonny’s serial monitor.
If you’re using an OLED display (SSD1306), install the driver and display readings:
from machine import Pin, I2C
import ssd1306
i2c = I2C(0, scl=Pin(17), sda=Pin(16))
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
oled.text(f"Temp: {temp}C", 0, 0)
oled.text(f"Hum: {hum}%", 0, 10)
oled.show()
If you have a Pico W/WH, you can host a small web server to display data in any browser.
Watch a step-by-step build here: YouTube Tutorial
This weather station is an easy way to get started with MicroPython and sensor projects. Whether you display readings on an OLED or stream them to the web, you’ll learn valuable skills in electronics, coding, and data visualization.