This is a small project to create a programmable pc usb adapter for a ps2 controller. It is cross platform. I made it because I was having trouble installing the usual software solution (antimicro, joy2key etc). The library doesnt compile for teensy 2.0. I used a clone arduino micro, but any arduino supporting usb hid should work. Because it is programmable you can set button combos to emulate certain keys. The code has keybinds for tomb raider 2 on steam via proton.
Step 1: Bill of Materials.
3 feet of 26 awg solid core insulated wire.
flux cored electronics solder and iron
ps2 controller to usb adapter to scavenge socket from
micro usb cable to suit arduino
hot glue and means to melt it.
Step 2: Disassembly and Reassembly
first, open the usb adapter with a screwdriver, removing the internals. then using a hacksaw cut the pcb behind the socket pins. then using a sidecutters, break the pcb between each pin. Then desolder the pcb islands from each pin.
Now, cut 6 lengths of wire 4 inches long. solder as per the diagram above from the rear of the socket to the arduino. I changed the pinout as some pins were missing on the clone arduino, . If you are unsure check the top image here:
The pinout is commented correctly in the code
ps2x.config_gamepad(10, 16, 14, 15, false, false); /* setup pins and settings: GamePad(clock, command, attention, data, Pressures?, Rumble?) check for error*/
Step 3: Uploading the Firmware
now, copy the library to the library folder your 1.8.8 version install or higher. The clock rate is modified slightly over the original library by changing
#define CTRL_CLK 15 in ps2x_lib.h and a few other similar lines randomly lol. This was because I ran into the same problem as here
If you run in to trouble get the unmodified library linked in the code.
now compile and upload to the arduino.
If it works a little ( I recommend key-mon under linux for testing) then hot glue everything securely to prevent wire breaks.