So there’s a nicely labeled pinout for the controller from curios inventor, but there is nothing documenting the Arduino wiring. Once I’ve determined my:
Data, Command, Vibration Power, GND, VCC, ATT select, Clock, N/C, and ACK pins
How do those all match up with the Arduino? Thank you for your help as I realize I may have overlooked something on your site (I’ve been going in circles a little on here).
Also, you should look into typedef-ing your error codes and controllers. Gives your numbers a little more meaning and makes the code more readable.
// PS2 controller options
typedef enum {
kControllerUnknown,
kControllerDualShock,
kControllerGuitarHero
} kController;