Skip to content

TheMonkeyz/climatemonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Plotting Arduino DHT sensor data using data.sparkfun.com and Google Charts.

screenshot

Inspiration

I struggled for a while to log my data to plot.ly by following this tutorial and debugging the hell out of it. I finally succeeded today but now they want me to pay 20$/month to keep using it. After searching for another solution, I found this interesting tutorial. I'm using an ethernet shield so I didn't go at it in the same exact way. And since I already had something that worked, I hacked on from what I had.

There's a lot of cleaning up to do, but here's what I have right now. There was a humidex calculation included, but I didn't realize it was included in the DHT library so it got nuked. I might include it again sometime.

Doing it

You will need

Hardware

(Links are provided for convenience, that's exactly what I have ordered.)

Software

Cloud services

Assembly

Spare me some explanations, just plug everything in like they do in this tutorial.

Storing our data

Create a data stream on data.sparkfun.com. Give it a name, a description, make it public or private, and define two fields: "humidity, temp", just like they suggest. The other fields are at your discretion. Now take good note of your public URL, you public key and your private key. You don't want to lose them.

Installing the software

Install the Arduino IDE, clone the DHT library and load up the .ino from this repository. Replace "your_public_key" and "your_private_key" with guess what. Upload the sketch to your Arduino and let it go. It will send data once per minute.

Now open up the index.html file in a text editor and replace "your_public_key" once again. Save the file and open it in your browser. If all went well, it should work!

How it works.

The arduino sends it sensor data to data.sparkfun.com via a query string once per minute. The index.html contains Javascript and CSS (I know, I should separate them...) that will query your output URL then draw two gauges and a chart from your data. When you query your output URL, you get all the results from the beginning of your recording. The initial example only queried for the first page of results, I somehow made it request for three pages of data and concatenated them together. I made some visual tweaks for it to fit perfecly on my cheap tablet, added full-screen mode and AJAX reload every minute.

Contributing

If you want to help me clean this up, maybe redo some code here and there. I don't really know Javascript, I guess my code is pretty ugly. Improving the readme so that it can stand on its own would also be a welcome improvement. Feel free to fork the repo and to send me pull requests.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages