Joystick through PC to Arduino

Hello

so I want to control two servo motors using a joystick whilst having that connected to the PC. The main reason for this is because he joystick itself is only emulated and is being controlled through another program. I am a complete noob when it comes to coding and programming so I was hoping that someone could tell me where I can find some sample code that would read the position of the joystick from the computer and then take that through to the servos.

If it helps the emulator I am using is called PPJoy; it creates a device present in the Win Control Panel and allows for 6DoF. The input into that is coming from a headtracking software called FreeTrack, which follows the movement of a set of LEDs.

Thanks for any help! :smiley:

I am a complete noob when it comes to coding and programming so I was hoping that someone could tell me where I can find some sample code that would read the position of the joystick from the computer and then take that through to the servos.

There is no program for the Arduino that can do that.

Whatever program on the PC is currently concerned about making up the joystick data would need to be modified to send that data to a serial port (the one that the Arduino is connected to).

You would probably need to write an application on the PC that uses DirectInput to receive joystick events, converts those to steering commands for the Arduino and sends the commands to the Arduino's serial port. At the Arduino you'd need a sketch which read commands from the serial port and actioned them.