processing arduino program

hello all, i'm trying to follow this tutorial to send feeds from my arduino to pachube but the processing sketch always shows 0.0 as sensor value i tried reading the value in firmata test application and it worked correctly ( that meens the circute is ok and the firmata is loaded correctly)

i'm using arduino demillanova and firmata library 2.2

this is the processing sketch:

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

Arduino arduino;
float myValue;

void setup()
arduino = new Arduino(this, Arduino.list()[0], 115200);

void draw()
myValue = arduino.analogRead(0);

The analogRead() function returns an integer value in the range 0 to 1023. Why are you storing the return value in a float.

You print a list of serial ports. You connect to the first one in the list. You might say something about the list printed, and whether your Arduino really is attached to the first port in the list.

thanks for the reply

actually my arduino is connected to the second port, so i changed it and changed the float variable to integer baut i still get the same result

What kind of Arduino do you have?