Interfacing Arduino with Flight Simulator

Hi everyone,
Me and my friends are building a 6 degrees of freedom motion platform for our final year project.
We’re using an arduino uno, 6 DC servos and flight simulator x or 2004.
We want to program the arduino to move the servos, and we want to show the movement on the flight simulator as well.
So basically when we move the aircraft in the game we’d like the platform to move with it as well.
We’re facing few problems in interfacing the arduino with the flight simulator, I’ve attached the code we’re using below. We found it somewhere on the internet.
We found few problems with the code, I’d love if anyone can help with it and help me in knowing how to interface the arduino with the flight simulator.

Thanks.

Code.ino (3.34 KB)

Are you using the arduino to monitor the joystick and move the servos to reflect that? Then you don't have to deal with the software interface to the PC. Otherwise you need to program the arduino to act like the keyboard and mimic all the button pushes & stuff. I think there are project sites that specialize in mimicing user input from the keypad.

7amood3li: We found few problems with the code, I'd love if anyone can help with it

What problems are you looking for help with?

7amood3li: and help me in knowing how to interface the arduino with the flight simulator.

Presumably you will need to get the position and attitude state data out of the simulator - or perhaps position, attitude and accelerations, if you're going to try to drive the model so that some imaginary occupants would experience the accelerations that mimiced what the virtual plane was doing. How to do that seems like a question that should be aimed at the support community for whatever simulator you're using.