Is Your code secret? I would like to se it. Use code tags to attach it. How, is told in the leading topics "How to use Forum", "How to attach…."
To read a joystick I would not go for any library. What do You want that library to do?
Apologies, I thought I would summarise my finding instead of pasting whole lengthy lines of error codes.
Of course it won't work. Did you read "This article discusses how the Arduino Leonardo and the Arduino Micro can also appear as one or more generic Game Controllers or Joysticks."? Those controllers mentioned are definitely not your UNO.
Not making excuses but I am new to the forum and Arduino and finding the relevant information is like finding a needle in a haystack at the moment. I'll definitely pay more attention to pinned topics next time.
If you have an official Uno or a faithful clone, there is a way to do this, but it's a very advanced project that could cause your Uno to no longer be usable if something goes wrong. For this reason, I recommend that you just buy an Arduino board with native USB capabilities (Micro, Pro Micro, Leonardo, MKR, Nano 33 IoT), as this will be the easiest way to achieve your project.
As you discovered, the Uno's primary ATmega328P microcontroller doesn't have native USB capabilities, however there is a separate microcontroller on the Uno that does have USB capabilities. This is the ATmega16U2 normally used as a USB to serial adapter. It's possible to program the ATmega16U2 to act as a USB joystick. You can find more information about this here:
GitHub - NicoHood/HoodLoader2: 16u2 Bootloader to reprogram 16u2 + 328/2560 with Arduino IDE
(see the wiki)
Thank you, I'll look into this and perhaps purchase a Pro Micro as option 2.
Yes, there is a way to use Arduino Uno as joystick. Here is a suitable library for your use GitHub - AlanChatham/UnoJoy: UnoJoy! allows you to easily turn an Arduino Uno (or Mega or Leonardo) into a PS3-compatible USB game controller using this library you can just convert your uno into a fully functional joystick you don't need any additional programmers. Also there many examples based on this library which you can find in the internet.
Thank you , AKASH
Thank you, I'll defiantely look into this.