levitra ricetta vente cialis viagra ricetta tadalafil 10 mg commander du cialis vente kamagra acheter finasteride acheter accutane achat tadalafil vardenafil generika cialis ordonnance medicament viagra viagra te koop cialis sur le net farmaci impotenza achat de cialis tadalafil moins cher cialis prix generique du cialis comprar cialis em portugal acheter clomid en france cialis prijs acquisto viagra net viagra ohne rezept acquisto viagra kamagra rezeptfrei commande cialis curare impotenza acquista levitra generique du viagra sildenafil precio vendo cialis cialis pharmacie cialis venta libre acquistare cialis viagra effet secondaire comprar viagra pela internet acheter cialis internet zithromax prix medicament cialis cialis rezeptfrei viagra vendita libera pastilla sildenafil achete levitra commander cialis acheter cialis pharmacie achat de levitra viagra europe il viagra acheter cialis sans ordonnance kamagra kopen viagra svizzera levitra generique cialis en ligne viagra pharmacie levitra generico kamagra generique commande viagra vardenafil generico acquisto viagra in farmacia acheter kamagra france cialis livraison rapide venta viagra viagra bestellen compro cialis tadalafil venta pharmacie en ligne medicament impuissance sildenafil costo kamagra apcalis acheter levitra pas chere acheter du levitra comprar vardenafil viagra vendita italia kamagra gel costo levitra citrate de sildenafil viagra controindicazioni levitra prijs sildenafil sin receta viagra kopen kamagra pas cher impuissance sexuelle cura impotenza achat vardenafil comprar tadalafil acquisto viagra senza ricetta cialis ricetta medica levitra senza ricetta vendo cialis levitra naturale vendo levitra acheter propecia pilule levitra prix de cialis levitra ordonnance levitra svizzera cialis quebec viagra rezeptfrei viagra alternativo aquisto cialis levitra prix cialis generico sicuro viagra senza ricetta acheter cialis generique viagra suisse trouver du cialis comprar sildenafil achat de viagra viagra cialis differenze viagra verkauf sildenafil receta ordina viagra generique cialis vardenafil bestellen acheter zyban prozac prix cialis preço viagra en ligne levitra receta vardenafil 10 mg traitement impuissance cialis moins cher levitra kopen levitra en ligne probleme erection impotenza rimedi levitra precio prezzi viagra tadalafil generique levitra donna cialis kauf

Getting Started with Pachube & Arduino

Another post on Pachube and how easy it is to get setup and going. This post will cover the basic steps on how to get some sensors online!  I will be using my project of two light sensors as an example.  The status of my light sensors are viewable at http://www.pachube.com/feeds/2145

Pachube + Arduino from Morgellon on Vimeo.

STEP ONE: GET A PACHUBE ACCOUNT!

Head over to the Pachube website and see various sensors from all over the world and view their status.  Be sure to view the ABOUT page, this describes INPUTs and OUTPUTs, along with ways to interface with Pachube and your sensors.  The QUICKSTART page has the details to get started and how to use your API.  Pachube is still in beta, so you’ll need to get an invite code… but no worries, Pachube has an email address on the QUICKSTART page.  Just send them and email asking for an invite and what you would like to do.  If they let me in… they will let anyone in! ;)

STEP TWO: PREPARE ARDUINO!

The Arduino can be interfaced with Pachube two ways: 1. With an Ethernet shield OR 2. Via USB connected to a PC running Processing… which is the way used in this tutorial… as I feel it is an easy and inexpensive way.  You can learn more about each way at the Pachube Arduino page.

To prep the Arduino, you need to connect the sensors you will be using and verify that they are working correctly! Once the sensors are good, then upload the “Standard Firmata” to the Arduino.  Now the Arduino is prepped for Pachube!  Leave the Arduino connected to the PC.

STEP THREE: PREPARE PROCESSING!

To have Processing communicate easily with Pachube, you will need to add a few libraries.  They are the Pachuino, Arduino and EEML libraries, they are available and there is more info at the PACHUINO page.  Download, unzip and move them to the libraries folder, in your sketchbook folder.  Now Processing is ready!

STEP FOUR: PREPARE INPUT FEED!

Once you have a Pachube account and your API key, go ahead and set up a new feed for your sensors.  Since I have light sensors, I started a new INPUT FEED.  I chose to make my feed “manual” (as this is easier for me) which means Pachube gets updates only when I send them.  Instead of Pachube connecting directly to my PC to pull the info.

STEP FIVE: PREPARE CODE FOR PROCESSING!

Once you have the libraries in the folder, you are ready to start Processing and start coding.  Below is the code I used for my light sensor.  This was taken from the sample code and stripped to make it more simple. I added a LED on pin 11 to light up (to let me know when my Arduino was running) and a delay(1500).

Be sure to add you API Key, and the URL of your INPUT FEED!

import processing.serial.*;
import cc.arduino.*;
import eeml.*;
import pachuino.*;

Pachuino p;
Arduino arduino;
int ledPin = 11;

void setup(){
p = new Pachuino(this, Arduino.list()[0], 115200);
p.manualUpdate(”http://www.pachube.com/api/2145.xml”); // change URL — this is the feed you want to update
p.setKey(”—YOUR API KEY HERE—”);

// local sensors
p.addLocalSensor(”analog”, 0,”Light Sensor Inside”);
p.addLocalSensor(”analog”, 1,”Light Sensor Outside”);
}

void draw(){
//p.debug();
p.digitalWrite(ledPin, Arduino.HIGH);
delay(1500);
}

// you don’t need to change any of these

void onReceiveEEML(DataIn d){
p.updateRemoteSensors(d);
}

STEP SIX: LAUNCH CODE AND COLLECT DATA!

Make sure that:

  • Sensors are *working* and connected to Arduino
  • Arduino is running “Standard Firmata” and connected to computer
  • Processing is collecting sensor data from Arduino
  • Computer has Internet connection

Now run your program and begin collecting data and sharing it on the web!!  Check your feed to make sure you data is being transmitted.  Have fun and happy tinkering!

–Morgellon OUT!

 

Leave a Reply