Controlling servos using processing and standard firmata

I am working on a biped robot that I am running using Processing and servo firmata on an arduino uno.  This works fine and I have a decent walking gait.  I would like to include an accelerometer into the robot to give the robot more stability.  So I decided to switch over to standard firmata on the arduino so I can use the i/o.  The problem is that with the standard firmata none of the servos work eventhough the servo library is still included in the standard firmata.  

I did not change the processing code between the servo firmata and standard firmata trials. I'm stumped on what to try next.  Has anyone used the standard firmata to control servos through processing?  Has anyone had this same problem?  Any ideas are welcome.

Thanks for the post. Sorry

Thanks for the post.  Sorry about the lack of information.  I thought I had searched google a lot but I guess I had missed that one. That link actually answered my initial problem. When using Processing and standard firmata the initialization for the servos has to be

arduino.pinMode(servopin, 5);

instead of

arduino.pinMode(servopin, 4);

Anyways that got the servos to move with the standard firmata.  Now I have noticed another problem.  When using standard firmata, a servo control program on Processing moves the servo from 0 to 90 degrees.  I loaded the servo firmata onto the arduino uno and ran that same program and the servo moved from 0 to 180 degrees.  Here is the code for that simple program.


import processing.serial.;

import cc.arduino.;

Arduino arduino;

int pos=0; //servo position in degrees (0…180)


void setup()


  size(360, 200);


  arduino = new Arduino(this, Arduino.list()[4], 57600); //your offset may vary




void draw()


// read mouseX coordinate

  int newPos = constrain(mouseX/2,0,180); // update bg & servo position if mouseX changed


  if(newPos != pos)



    arduino.analogWrite(9, newPos);

    println (" newPos = " + newPos );

    pos=newPos; //update servo position storage variable



I added +90 to the output of the servo.  This made the sweep reach from about 0 to 180, but the motor gave up its torque at each end probably because the input value went over what the servo will accept as a value?  (I’m speculating)  This trick didn’t fix the problem because I added it to the biped control and the motion was not  similar to that of the servo firmata tests.