Monitoring temperature and humidity

I bought a cheap DHT22 humidity and temperature sensor module from eBay. It comes with the jumper wires you need and, as far as I can tell, it doesn’t require a resistor, meaning you don’t have to mess around with a breadboard. The benefit of this is that it comes ready to plug straight onto your GPIO pins.

I connected the sensor to my Pi (+:VCC, OUT:data port, -:GND) and used the instructions from Adafruit to get it recording the data and adding it to a Google Spreadsheet. I changed the Python code to update my spreadsheet every five minutes. You can make a nice chart from this but the charts available don’t automatically expand the range if you add more data (i.e. if your Pi is updating the spreadsheet every few minutes). You have to use Script Editor if you want to make a chart from a dynamic range. Also, I found that Google Drive on my Nexus phone doesn’t display charts, so if I wanted to be nerdy and check my chart at any time of day, I couldn’t.

I created a GitHub Page as it looked like a quick way of making a website. It was! Then it was easy to use the Google Chart API to make a line chart for my site. This now shows the most up-to-date readings from my Pi sensor (provided I have my Pi turned on): http://abbie2020.github.io/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: