I'm developing a simple tracking system using the Sparkfun 9dof Razor IMU and a servo motor. I have a C++ application that reads the IMU data and calculates the change that needs to be made so that the system is pointed at the set location. Now I need to implement the Servo to read this calculation and rotate as needed.
The 9dof Razor IMU is using a simple FTDI breakout board to connect via USB. I am using an Arduino Uno R3 to control the servo.
I want to implement the servo rotation in my C++ program so the Arduino rotation signals will be sent from that. Right now, I'm looking into using Firmata to do this.
So with Firmata, I upload the standard firmata code to the Arduino and then control it elsewhere. My problem is I'm not sure where to begin with controlling it in my C++ program. All the code needs to do is determine if the change needed is negative or positive. If the value is negative it rotates in one direction. If it is positive, it rotates in the other.
Any suggestions or help would be greatly appreciated. I am completely open to using something other than Firmata.