so this is my wiring
when I tried to compile the code using this particular library,
i am getting this error
Arduino: 1.8.19 (Windows 10), Board: "Arduino Uno"
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::NewButtonState()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::NewButtonState(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::ButtonPressed(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::ButtonReleased(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::Button(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::ButtonDataByte()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::Analog(unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::readType()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::_gamepad_shiftinout(char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::sendCommandString(unsigned char*, unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::enableRumble()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::reconfig_gamepad()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::read_gamepad(bool, unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::read_gamepad()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::enablePressures()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char, bool, bool)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::NewButtonState()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::NewButtonState(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::ButtonPressed(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::ButtonReleased(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::Button(unsigned int)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::ButtonDataByte()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::Analog(unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::readType()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::_gamepad_shiftinout(char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::sendCommandString(unsigned char*, unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::enableRumble()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::reconfig_gamepad()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::read_gamepad(bool, unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::read_gamepad()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::enablePressures()'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char, bool, bool)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
libraries\PS2X_lib\PS2X_lib.cpp.o (symbol from plugin): In function `PS2X::NewButtonState()':
(.text+0x0): multiple definition of `PS2X::config_gamepad(unsigned char, unsigned char, unsigned char, unsigned char)'
sketch\PS2X_lib.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno.