Using bluetooth games console controllers with microcontrollers (ESP32, Arduinos etc)
Hi Bill and everyone out there
I recently posted a specific request for help on this topic in the ESP32 & ESP8266 forum, however I think it might be an area of much wider interest for a video, with many project applications given a little expert help.
Games controllers from consoles such as PS2/PS3/PS4 have a large number and variety of control 'channels' (e.g. PS3 has 2 sticks, each 2-axis, plus two 'triggers' and 12 other buttons), they have a high build quality, sensitive and proportional controls, are cheap and above all are 'ready to go', off the shelf, vs alternative control types (like nRF24, 433MHz or traditional RF).
Meanwhile, many microcontrollers like my ESP32 dev board have BT (classic) installed or can have BT shields added, and therefore pairing with a game controller releases a huge number of control input options without using up GPIO pins, and with BT MAC addressing removing interference issues. The microcontroller means then inputs can be mapped to any functions and outputs, to control many projects.
There is a scattering of guidance on this online I could find, but it is patchy. The video at this link for example, brilliantly shows the potential of such a combination with a MeArm...
...but I think isn't quite accurate (e.g. on which MAC address the game controller stores) and when I tried to follow it, with same hardware and their code, it didn't work. There isn't enough detail or troubleshooting to then fix it. Similar videos are around, but I think we need a comprehensive, step by step tutorial to the 'DBW standard', that includes common issues, considerations and troubleshooting.
And yes, this is a little enlightened self interest too, I need to get this working! As a beginner, 'plug and play' options like have particular appeal. But I would love to see if other people would like to see a video on this topic.
Many thanks, interested to hear your thoughts.
Update to my request for a video on this topic; I have been helped to find a solution, still think this would make an excellent video. Here is what I just posted back in the forum thread as feedback:
@will Hi Will and all. I thought you'd be interested to know, I've cracked the problem of connecting the Ps3 Controller over bluetooth to ESP32, and it works great. Many have struggled with this, Parvaiz Ahmad out in Pakistan found the solution for me. Hopefully many of you will find this interesting as I now have a massive selection of control options from the Ps3 controller (have got robot car handling beautifully using the analogue joystick) BUT do beware the 'old software version' element.
The MAC address conversation we were having was not the issue as it turns out. Thanks to everyone for their help, especially Will and of course Parvaiz.
Details below...(copied from my response on a youtube forum):
"I tried for ages to get this to work too, compiling but not connecting. Eventually someone figured out the issue; the Ps3 connection worked with old version 1.0.2 of the ESP32 board manager (in the arduino IDE, just go to board manager and search). Current version is 1.0.6 and it for whatever reason doesn't work anymore. You need to uninstall 1.0.6, then install 1.0.2. You also need to remove Ps3 controller library current version (I had 1.0.0) and install older 1.0.0.
If those two don't work, try completely removing the IDE and then install 1.8.15 (caveat, not sure if necessary but works for me). If so you have to remove the hidden cache files for the arduino app beforre install step, here's a link to how.
Final couple notes...I don't know whether the cache removal is also needed to successfully revert to older ESP board manager, or just the ICE, I did both simultaneously to solve issue for me. Fiddle around with it? Thanks to Parvaiz Ahmad for finding a solution, he has made a YouTube video about it:
Also, if you're planning to use this code now merged with other code, you may have an issue whereby those other parts need up to date manager but mutually exclusive with Ps3 control needs."