Close

Gamepad

A project log for BorgCube ROV

Underwater robots!

tim-wilkinsonTim Wilkinson 04/12/2016 at 00:560 Comments

Life has been a little busy, so updates have been slow in coming (and most of the work has been in the software which is wait on a long log entry); but more interesting stuff soon. In the meantime I've been looking at what game controller makes sense for controlling the ROV. Since my son had an Xbox 360 controller sitting around I initially thought that might work well - you can certainly make it work on a PC (with a little convincing Windows that is okay really) and on the Mac there's a fantastic project to provide a driver (see https://github.com/360Controller/360Controller). However, both require a USB port and on my MacBook I only have the one which is plugged into the tether box. What to do? After all, while Macs are hardly gaming machines, there must be some sort of gamepad you can get for them ... right? And it turns out that this is true - specifically the PS4 Wireless gamepad controller is a Bluetooth device, will quite happily pair with a Mac, and work just fine.

On the software side, the gamepad is exposed via a browser API (see https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API) just like a mouse of keyboard. It's all suspiciously easy.

Discussions