Firmata porting capabilities

Hi,

Up until now, I have been interacting with an arduino by using the firmata library for processing.

Due to my poor programming skills in Java, I'm forced to go to something much more friendly to me: C++.

The question is: where can I get a library developed in C++ to work with on visual studio? The end objective is to control 8 servos.
I hope there's something already implemented, because writing on myself a new library for firmata protocol would be insane.

I hope there’s something already implemented, because writing on myself a new library for firmata protocol would be insane.

So, ditch Firmata. It is not difficult to use C++ to send “<N:PPP>” to the Arduino, where N is the servo # and PPP is the servo position.

Reading start and end of marker delimited serial data is easy:

#define SOP '<'
#define EOP '>'

bool started = false;
bool ended = false;

char inData[80];
byte index;

void setup()
{
   Serial.begin(57600);
   // Other stuff...
}

void loop()
{
  // Read all serial data available, as fast as possible
  while(Serial.available() > 0)
  {
    char inChar = Serial.read();
    if(inChar == SOP)
    {
       index = 0;
       inData[index] = '\0';
       started = true;
       ended = false;
    }
    else if(inChar == EOP)
    {
       ended = true;
       break;
    }
    else
    {
      if(index < 79)
      {
        inData[index] = inChar;
        index++;
        inData[index] = '\0';
      }
    }
  }

  // We are here either because all pending serial
  // data has been read OR because an end of
  // packet marker arrived. Which is it?
  if(started && ended)
  {
    // The end of packet marker arrived. Process the packet

    // Reset for the next packet
    started = false;
    ended = false;
    index = 0;
    inData[index] = '\0';
  }
}

Parsing the data is trivial, using strtok(). Converting the tokens to numbers, using atoi() is trivial. Using the servo number of index into the Servo object array is trivial. Moving the nth servo to the appropriate position is trivial.