Recently I just bought a Thrustmaster TCA airbus throttle.

You can buy it here.

I want to use this throttle to control the fan speed of the server in my data center.

<iframe height="600px" src="https://anduins-site.player.aiur.site/pxl_20221121_015946930_265.mp4" ></iframe>

Super easy.

Install SharpDX.DirectInput first.

dotnet add package SharpDX.DirectInput

Run the following code to read from GameControl. You can also read from other types like Joystick.

        var directInput = new DirectInput();
        var device = directInput
            .GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AllDevices)
            .First();
        var joystickGuid = device.InstanceGuid;
        var joystick = new Joystick(directInput, joystickGuid);
        joystick.Properties.BufferSize = 128;
        joystick.Acquire();
        while (true)
        {
            joystick.Poll();
            var datas = joystick.GetBufferedData();
            foreach (var state in datas)
            {
                Console.WriteLine("Event" + state);
            }
        }