# Servo with Firmata and Processing

**URL:** <https://forum.arduino.cc/t/servo-with-firmata-and-processing/51870>\
**Category:** Interfacing w/ Software on the Computer\
**Created:** [February 10, 2011, 1:12pm UTC](https://forum.arduino.cc/t/servo-with-firmata-and-processing/51870 "2011-02-10T13:12:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [February 10, 2011, 1:12pm UTC](https://forum.arduino.cc/t/servo-with-firmata-and-processing/51870/1 "2011-02-10T13:12:43Z")

</div>

Hey People, I'm searching now for amazing 3hours 😲, but I hadn't found ANYTHING, please help me guys!!!

I have an Arduino and I uploaded StandardFirmata on the Arduino.

On the other hand I'm working with Processing, and now my question:

How can I handle a Servo in Processing?  
It has to work because there are Servo-Tags in the Source of StandardFirmata.

I tried PWM-Functions in Processing, with the Standard-Firmata uploaded on the Arduino but nothing works 😥.  
I tried this:

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

int reservedPin = 9; //It's a PWM-Pin
Arduino arduino; 

void setup()
{
  size(127,127);
  arduino = new Arduino(this, Arduino.list()[0], 57600);
  arduino.pinMode(9,arduino.OUTPUT);
}

void draw() {
}

void mouseReleased() {
  for(int ia=0;ia<256;ia++) {
    arduino.analogWrite(reservedPin, ia);  
    if(ia==255) {
      ia=0;
    }
  delay(10);
  }  
}

```

When I execute the program which is called like "firmata\_test" from [http://firmata.org/](http://firmata.org/), I can choose PWM in the Pin-List and also Servo and then the hole thing works.  
So, we can count the StandardFirmata out!  
But how I have to write the source so that the function works????

Please help me!  
Thank you very much!

Regards,  
GraKa!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [February 11, 2011, 1:12am UTC](https://forum.arduino.cc/t/servo-with-firmata-and-processing/51870/2 "2011-02-11T01:12:27Z")

</div>

You need to set the mode of the pin that the servo is attached to, to SERVO.

Servos don't use PWM, by the way.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 11:24am UTC](https://forum.arduino.cc/t/servo-with-firmata-and-processing/51870/3 "2021-05-06T11:24:35Z")

</div>

Closed on May 6, 2021, 11:24am UTC


