The PS2X library is not yet registered with PlatformIO – I suggest you go to GitHub - simondlevy/PS2X_lib: Arduino Playstation2 library with compiler warnings fixed, download the ZIP file (https://github.com/simondlevy/PS2X_lib/archive/master.zip), then create a new folder in lib/
called PS2X_lib
where you put in the files from the ZIP file so that the structure is …
lib/
PS2X_lib/
PS2X_lib.cpp
PS2X_lib.h
...
then add the line
lib_deps =
PS2X_lib
into the platformio.ini
so that the library is looked for by PlatformIO.