Reading the Analog Inputs

This example reads all the analog inputs using a loop, and draws a bar for each. For all these examples, you need the file ezio.pde (from ben's ezio page). Save it in the sketch folder with your sketch .pde file so you can use the EZIO object.
import processing.serial.*;


EZIO ezio;
int out;
void setup()
{
   println(Serial.list()); 
   ezio = new EZIO (this,"/dev/ttyUSB0");
   out=0;
}

void draw ()
{
   int d;
   int i;
   int a;
   background(0,0,0);
   fill(255,255,255);
   for (i=0;i<8;i++)
   {
     a=ezio.a2d(i);
     rect(0,i*10,a,8);
   }
}