You can use it as some sort of virtual vJoy device. This is what the sketch is doing at the moment. It will receive messages through the COM port and update the current position of the joystick. It ...
First, create an instance of the library for your touchscreen. The digital pin used for chip select is required. The normal MISO, MOSI and SCK pins will be used automatically. #define CS_PIN 8 XPT2046 ...