Mini Weather Station
tags: python arduino
Written in Python and Arduino Programming Language.
While clearing out recently I found an old Arduino I had used back in 2017 as part of my VR Glove project. I decided it was time for a repurposing, and given the upcoming weather forecast I decided to make a mini weather station that could record temperature and humidity.
The component I had on hand was a DHT11 sensor module, so I imported a DHT library and wrote some code to monitor the sensor. The code was very simple - every second it would read temperature and humidity, and send it over the serial port.
Meanwhile, some Python code I had written would run on a laptop, read from the serial port every 5 seconds, and log the data (and current time) to a .txt file, structured in a way that OpenOffice Calc can easily parse into tabular form.
After writing the code and giving it a quick test, I put the ‘station’ in a shaded part of my garden and left it to do its thing. It recorded data from around 8:50am until 9.55pm.
After recording, I opened the .txt file in OpenOffice Calc to generate a table of the data, and then simply created graphs from it.
At some point I plan to add sensors to record wind speed and rainfall, alongside constructing a proper enclosure, i.e. a Stevenson screen. It would also be nice to switch out the laptop for something like a Raspberry Pi and have it host the data on a web server for easy remote access.
Click image to view larger. (Excuse that X axis)
Code will be available on GitHub soon!