Sun 06 March 2016
You can use bluetooth, SDL2, and python to talk with a controller.
First we need to pair the controller with your Mac:
- Use a Micro-USB cable to connect the PS4 controller to your Mac.
- Press the PlayStation button in the middle of the gamepad (to turn it on).
- Choose Apple > About this Mac.
- Click System Report.
- Choose USB and look for Wireless Controller under USB. If you can see Wireless Controller (it's called "wireless" even though it's connected via a cable), then your PS4 controller is connected to the Mac.
Next, connect the controller via bluetooth:
- Open System Preferences (Apple menu > System Preferences).
- Click Bluetooth.
- Put the PS4 controller in Discovery Mode by holding down the PlayStation button and Share button at the same time. The light on the front of the controller will flash quickly, and Wireless Controller will appear in the Bluetooth window.
- Click Pair. The device will now say connected, and you'll see how.