3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Temperature sensor / weatherstation

Step 6Software setup - graphing

Software setup - graphing
«
  • term1.png
  • term2.png
This is the tricky part, lot's of scripting needed here.

1)
Make a place to put the scripts, a place to store the images, and a place to store the data.
`mkdir /etc/tempsensor`
`mkdir /var/www/temperature`
`mkdir /var/log/digitemp_rrd`

2)
Install software:
You will need, PHP and RRDtool.
`apt-get install rrdtool`
`apt-get install php` (there are many php packages, install one with a console executable)

3)
Download and install the scripts responsible for makin the graphs:
Download tempsensor-0.1.tar.gz to your linux machine.
`tar xvzf tempsensor-0.1.tar.gz`
`cp -v tempsensor/* /etc/tempsensor`

4)
Configure the scripts
Open /etc/tempsensor/config.php and follow the comments in this file.
Change the script to read input data from "/var/www/digitemp.txt" if you followed the example in the previous step.

5)
Automate.
Add a crontab entry the same way as in the previous step. The script should run every 5th minute.
The lines should look like this:
`*/5 * * * * php /etc/tempsensor/logdata.php`
`*/5 * * * * php /etc/tempsensor/graphdata.php`

6)
Run the scripts manually to check if it works.
php /etc/tempsensor/logdata.php
php /etc/tempsensor/graphdata.php

7)
Visit http://your.ip.or.hostname/temperature or whatever you specified in the config file.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
652
Followers
7
Author:chr
I like microcontrollers and LEDs :D