Proessing 1.1 shows 0 output

Hi

I am newbie to Arduino and I started with the examples provided by ARDX (temperature) CIRC-10 and it works fine with arduino software.

Now I am trying to do the same thing with processing and try to read analogpin 0 (as I have connected it to analogue 0)

println(arduino.analogRead(0));

it gives me always 0

What am I doing wrong? Thanks

Code:
Arduino arduino;
float myValue;
int temperaturePin = 0;

void setup()
{

println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[1], 115200);
}

void draw()
{
println(arduino.analogRead(temperaturePin));
}

What sketch are you running on the Arduino?

I uploaded the example included in Firmata (StandardFirmata )

Soething I am not sure of! I use Arduino to upload this but use processing to run the code above! this is the way to do right?

That's the right thing to do. You have the line:-
arduino = new Arduino(this, Arduino.list()[1], 115200);
this is setting the serial rate to 115,200 Baud, this needs to be the same in the arduino is it?
Look at the code you have downloaded into it you should see a serial.begin(115200);
in the setup() function. If it says some other value you will have to change it.

Thanks. That was it.

I had to change the Baud rate in StandardFirmata to 9600 and as well in my code.

Is working now.

P.S. It is not enough that both should have the same value, u need also to have the right rate. at rate 11500 I had values but not correct ones.