Archive | July, 2015

Raspberry Pi 2 Weatherstation

10 Jul

I got a Raspberry Pi 2 for my birthday and, as a small evening project, ported my Arduino Weatherstation project to this new platform.


The setup is relatively simple: I used the Adafruit Python DHT Sensor Library to read the sensor values from the GPIO, logging the resulting values with a timestamp to a CSV file. Another python script then reads this files and creates a graph using the Matplotlib library (which can be installed easily on the RPi with sudo apt-get install python-matplotlib).


Both scripts are called every five minutesĀ  by crontab, and the resulting image is displayed on a webserver (I used nginx, which is also quite easy to install).

Next steps would be to log to a database instead of a file, and implement different visualizations over different time intervals.