# Copy the logger script to your Pi
scp enviroplus_logger.py pi@your-pi.local:/home/pi/
# Set up cron job for 5-minute logging
crontab -e
# Add this line:
*/5 * * * * /usr/bin/python3 /home/pi/enviroplus_logger.py >> /home/pi/enviro.log 2>&1
3. Set up the LCD display
# Copy display script and service file
scp display_readings.py pi@your-pi.local:/home/pi/
scp enviropi-display.service pi@your-pi.local:/tmp/
# Install and enable the display service
sudo mv /tmp/enviropi-display.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable enviropi-display.service
sudo systemctl start enviropi-display.service
4. (Optional) Set up email reports
Edit send_daily_report.sh to configure your email settings, then run it daily via cron or manually.
Data Format
Sensor readings are stored as JSON in ~/enviro_data/enviro_YYYY-MM-DD.json:
Temperature: Large °F display with °C in parentheses (red)
Humidity: % RH (blue)
Pressure: inHg with hPa in parentheses (green) - aviation-friendly!
Light: lux value (yellow)
Updates every 5 seconds with current sensor data.
Email Reports
Daily HTML email reports include:
Total number of readings collected
Temperature statistics (avg/min/max)
Humidity statistics (avg/min/max)
Pressure statistics (avg/min/max)
Light level statistics (avg/peak)
Professional formatting with color-coded sections
Files
enviroplus_logger.py - Main data collection script
display_readings.py - LCD display service
send_daily_report.sh - Email report generator
test_enviroplus.py - Sensor diagnostic script
enviropi-display.service - systemd service file
Troubleshooting
BME280 sensor returns wrong humidity (78% or similar)
The BME280 needs a "warm-up" reading. The logger discards the first reading and uses the second one. If you see consistently wrong data, check that the HAT is firmly seated on all GPIO pins.
LCD display not working
Verify SPI is enabled: ls /dev/spi*
Check service status: sudo systemctl status enviropi-display.service
View logs: tail -f ~/display.log
No I2C devices detected
Verify I2C is enabled: ls /dev/i2c-*
Scan for devices: sudo i2cdetect -y 1
Check physical HAT connection
Project Timeline
Built in ~3 hours from scratch:
Pi setup and SSH access: 10 min
Sensor discovery and testing: 30 min
Data logger development: 20 min
LCD display implementation: 30 min
Email reporting system: 20 min
Bug fixes and polish: 70 min
License
MIT License - feel free to use, modify, and share!