{
"$type": "site.standard.document",
"content": {
"$type": "site.subgraph.content.markdown",
"body": "\n![[at://did:plc:p5xem22ammiafn5kxonaksfa/site.subgraph.media/3mlp5jimjcsn4]]\n\nI 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.\n\nThe Environment HAT carries the sensors:\n\n- TSL25911 Digital Ambient Light Sensor\n\n - I2C address: 0x29\n - Effective range: 0~88000 Lux\n\n- BME280 Temperature, Humidity, and Air Pressure Sensor\n\n - I2C address: 0x76\n - Temperature: -40~85°C (0.01°C resolution, ±1°C accuracy)\n - Humidity: 0~100%RH (0.008%RH resolution, ±3%RH accuracy, 1s response time, ≤2%RH delay)\n - Air Pressure: 300~1100hPa (0.18Pa resolution, ±1hPa accuracy)\n\n- ICM20948 9-DOF Motion Sensor\n\n - I2C address: 0x68\n - Accelerometer:\n - Resolution: 16-bit\n - Range: ±2, ±4, ±8, ±16g (configurable)\n - Gyroscope:\n - Resolution: 16-bit\n - Range: ±250, ±500, ±1000, ±2000°/sec (configurable)\n - Magnetometer:\n - Resolution: 16-bit\n - Range: ±4900µT\n\n- LTR390-UV-1 UV Sensor\n\n - I2C address: 0x53\n - Response wavelength: 280nm - 430nm\n\n- SGP40 VOC Sensor\n - I2C address: 0x60\n - Measuring range: 0 ~ 1,000 ppm ethanol equivalent\n - Limit condition: <0.05 ppm ethanol equivalent OR < 10% preset concentration point\n - Response time: <10s (tau 63%)\n - Start time: < 60s\n\nA 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.\n\nThe code is open source, split across [office-space](https://github.com/iammatthias/office-space) (a Vite + React frontend reading from Supabase) and [office-space-db](https://github.com/iammatthias/office-space-db) (the Python and systemd service running on the Pi).\n\n![[at://did:plc:p5xem22ammiafn5kxonaksfa/site.subgraph.media/3mlp5joausco5]]\n",
"references": [
"at://did:plc:p5xem22ammiafn5kxonaksfa/site.subgraph.media/3mlp5jimjcsn4",
"at://did:plc:p5xem22ammiafn5kxonaksfa/site.subgraph.media/3mlp5joausco5"
]
},
"description": "Transforming a spare Pi Zero 2 W and Waveshare Environment HAT into a sensor hub that records environmental data every 60 seconds to.",
"publishedAt": "2025-01-10T19:22:47.495Z",
"site": "at://did:plc:p5xem22ammiafn5kxonaksfa/site.standard.publication/3mlp3ywhyv2kx",
"tags": [
"raspberry-pi",
"sensors",
"open-source",
"monitoring",
"hardware",
"mint",
"data-collection"
],
"textContent": "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.\n\nThe Environment HAT carries the sensors:\n\nTSL25911 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\n\nA 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.\n\nThe 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).",
"title": "Pure Internet: office---space"
}