Emulate an Xbox controller from your mobile device to your PC
Demonstration video: https://www.youtube.com/watch?v=dWrYsfU78Cs
Note: Some controls are missing, such as a dpad, and buttons for emulating when you press down on a thumbstick.
Install Python with pip.
Run the following in a terminal:
pip install vgamepad
pip install flask
Run the Server.py file. Two links will show up in the output. Go to the one that DOESN'T have 127.0.0.1 in it on your mobile device. You may have to disable your firewall on your PC to be able to access the page from your mobile device.
You should now be able to use the controls on your device and it will be emulated on your PC.