* connect a DS18B20 temperature sensor to an arduino
* read from the sensor using the 1-wire interface
* send that data to xively.com directly from the arduino
* view the resulting graph on the internet
http://xively.com is an Internet of Things host that generates graphs based on data you provide. In this example I am going to use it to monitor the temperature in my room. It's not a hackerspace, my wife keeps it far too tidy for that.
Step 1: Parts list
I have an arduino Uno clone and a wiznet 5100 shield.
* Power supply (it can be powered via the USB port)
I was fortunate that my router has USB ports that provide the 5v output meaning the arduino is powered whenever the router is and saves a plug, electricity, the environment and the future of the world.
* DS18B20 temperature sensor
* RJ45 network cable connected between the arduino and your router
Step 2: Schematic
* Arduino 5v to 4.7k resistor leg 1
* 4.7k resistor leg 2 to DS18B20 middle leg
* Arduino digital pin 2 to DS18B20 middle leg
* RJ45 cable from Arduino to router
* Power to Arduino (via USB or barrel jack, I use USB from my router)
Step 3: Prerequisites
onewire library from http://www.pjrc.com/teensy/td_libs_OneWire.html (specifically http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip)
httpclient library from https://github.com/amcewen/HttpClient (https://github.com/amcewen/HttpClient/archive/master.zip)
Xively library from https://github.com/xively/xively_arduino (https://github.com/xively/xively_arduino/archive/master.zip)
install these libraries in your arduino/library directory.
An account with http://xively.com (formerly pachube.com and cosm.com)
Sign up for a free developer account at https://xively.com/get_started/
Pick a username, password, set your address and timezone etc. You will receive a confirmation email, click the activation link to avtivate your account.
You can choose to take the test drive to learn about xively or skip it, this is completely up to you.
Doing the test drive? I'll wait
- \ | / - \ | /
Done? Let's continue