Arduino + Computer

The simplest way to use an Arduino with Pachube (i.e. to share your Arduino's real time sensor data with others and use other people's remote sensor data as inputs to your Arduino) is to control the Arduino with Processing, and let Processing do all the data formatting and serving to Pachube. The following documents assume you already know a little about how to work with Arduino and Processing.

pachube

Essentially, your Processing program will reside on a computer that is connected to the internet; it will control the Arduino and take sensor readings and serve this data to the Pachube website.

The quickest way to do this is to upload Firmata to the Arduino and use the Processing Arduino library to control it. When you do this, all your digital and analog reading and writing is managed by Processing, the serial data is automatically sent to the Arduino and the Arduino simply interprets the commands, whether it's setting pins' output values or taking sensor readings. Basically, with Firmata on the Arduino, you can write (in Processing) things like "arduino.digitalWrite(2, Arduino.HIGH);" and "myValue = arduino.analogRead(4);" which will, as you expect, set pin 2 high on the tethered Arduino and set 'myValue' to equal the analog reading from pin 4.

There are two tutorials available:

  • Build your own Pachube/Arduino/Processing application step-by-step, connecting Arduino to Processing to Pachube. Use this if you want to do non-standard things with your Arduino or if you want to understand exactly how to build a connection to Pachube.
  • Pachuino is a Processing template that does all the work for you. Effectively it enables you to have an Arduino with both local and remote sensors and to serve data to Pachube (and by extension others) without getting deep into the details.

If you would like to use Python rather than Processing, see this tutorial instead: http://community.pachube.com/node/114