Pure Internet: office---space

Matthias January 10, 2025
Source
I had a spare Raspberry Pi Zero 2 W and a Waveshare Environment HAT sitting in a drawer. The Zero 2 W is overkill for reading sensors and writing to a database, but the 64-bit processor makes library support easier. The Environment HAT carries the sensors: TSL25911 Digital Ambient Light SensorI2C address: 0x29Effective range: 0~88000 LuxBME280 Temperature, Humidity, and Air Pressure SensorI2C address: 0x76Temperature: -40~85°C (0.01°C resolution, ±1°C accuracy)Humidity: 0~100%RH (0.008%RH resolution, ±3%RH accuracy, 1s response time, ≤2%RH delay)Air Pressure: 300~1100hPa (0.18Pa resolution, ±1hPa accuracy)ICM20948 9-DOF Motion SensorI2C address: 0x68Accelerometer:Resolution: 16-bitRange: ±2, ±4, ±8, ±16g (configurable)Gyroscope:Resolution: 16-bitRange: ±250, ±500, ±1000, ±2000°/sec (configurable)Magnetometer:Resolution: 16-bitRange: ±4900µTLTR390-UV-1 UV SensorI2C address: 0x53Response wavelength: 280nm - 430nmSGP40 VOC SensorI2C address: 0x60Measuring range: 0 ~ 1,000 ppm ethanol equivalentLimit condition: <0.05 ppm ethanol equivalent OR < 10% preset concentration pointResponse time: <10s (tau 63%)Start time: < 60s A new entry every 60 seconds, give or take. The sensors occasionally stall, but the database aggregation absorbs most of it, and some error handling tries to reinitialize before rebooting. The code is open source, split across office-space (a Vite + React frontend reading from Supabase) and office-space-db (the Python and systemd service running on the Pi).

Discussion in the ATmosphere

Loading comments...