Project Goal
Every other project in this shop's catalog runs a single uploaded program on a microcontroller. This one is genuinely different: it boots a full Linux operating system from a microSD card and builds a real sensor dashboard on top of it. That difference matters in practice -- a real desktop if you want one, a real choice of programming language, real background services, and real multitasking, all running at once on hardware small enough to hold in one hand.
What the Controller Does
The Raspberry Pi 5 isn't a microcontroller running one program in a loop -- it's a complete computer running a full Linux operating system from a microSD card. That means the "program" for this dashboard can be a Python script, a small web server, a scheduled background service, or several of those running at the same time, the same way any desktop or server application would.
Parts You'll Need to Source Yourself
This project needs two things this shop doesn't currently stock as separate items: a microSD card (16GB or larger) to hold the operating system, and a power supply for the Pi. Any reputable 16GB+ microSD card will work fine for this project -- it doesn't need to be included in your order, just have one on hand before you start flashing the OS.
What the Temperature & Humidity Sensor Does
The AHT20 measures temperature and humidity and reports both values digitally over I2C, the same fundamental protocol used by microcontroller-based sensor projects elsewhere in this catalog. The concept doesn't change -- what changes is how you access it: instead of a microcontroller-specific library, you're going through Linux's own I2C driver stack (accessible from Python, or any language with I2C bindings) to read the same registers.
A Real Operating System, Not One Program
On a microcontroller, there's one program, and when it stops, nothing else is running. On a full Linux system, the sensor-reading code can be one small piece among many: a system service keeps it running in the background, a web server can display the data in a browser on your network, and you can SSH in and check on it, update it, or add new features without physically reflashing anything. This is the core practical difference this project is meant to teach.
Software and Library Concepts
On Linux, I2C access typically goes through a Python library that talks to the kernel's I2C driver (rather than a microcontroller-style Wire/I2C library), plus a sensor-specific library or a small amount of register-reading code for the AHT20 itself. Because it's a real OS, you have your pick of how to build the dashboard on top of that -- a simple terminal script that prints readings on a loop is a reasonable starting point before adding a web interface or logging.
Testing and Troubleshooting
- The Pi will not boot at all -- the most common real cause is a bad microSD card or an OS image that didn't finish writing correctly. Re-flash the card from scratch and verify the write actually completed before assuming a hardware fault.
- The I2C sensor is not detected -- confirm I2C is actually enabled in the Pi's OS configuration. It's disabled by default on a fresh install, and forgetting this step is extremely common and easy to overlook.
- The dashboard becomes sluggish over time -- this is normal Linux resource behavior, not a hardware fault. Check what's actually running in the background (logs, updates, other services) before assuming the Pi itself is failing.
- Sensor readings look stuck or repeat the same value -- confirm your read loop or background service is actually re-polling the sensor on schedule rather than caching or reusing an old value.
Optional Future Upgrade: Web-Based Dashboard
Once basic sensor readings are working reliably over I2C, a natural next step is serving them through a small local web page hosted directly on the Pi, so the dashboard is viewable from any device on your network instead of only on the Pi itself.
Wiring
- AHT20 VCC → Raspberry Pi 5 3.3V (physical pin 1)
- AHT20 GND → Raspberry Pi 5 GND (physical pin 6, or any GND pin)
- AHT20 SDA → Raspberry Pi 5 GPIO2 / SDA1 (physical pin 3)
- AHT20 SCL → Raspberry Pi 5 GPIO3 / SCL1 (physical pin 5)
- Raspberry Pi 5 → computer/power via USB-C cable
Enable I2C first: `sudo raspi-config` → Interface Options → I2C → Enable, then reboot (or edit `/boot/firmware/config.txt`). Install the library with `pip install smbus2` (or `sudo apt install python3-smbus2`). The Pi's 40-pin header I2C1 bus is always bus 1, so `SMBus(1)` is correct on every Pi model with this header — you don't need to detect it.