Trying to get Control

By last post I thought I had cracked it.

  • Connect bluetooth controller to raspberry pi - CHECK
  • Identify interactions with controller on the raspberry pi - CHECK

So I naively thought all I had to do was map the buttons to motor controls. Cue drawing of the controller and the buttons generated. Then my partner went away and used the controller to play a game, I connect later on and it’s all changed!!!

I spent a good few hours splitting hairs and getting familar with ds4dvr and evdev only to realise how much of a pain it was going to be. Then came along pyPS4Controller.

Here’s why it’s better for my purposes:

  • Much simpler for set up
  • All the event codes on the controller are already mapped

So what’s next? I’ve managed to get it to move left, right, go and stop using the controller. I’d like to get it a bit more fluid as is currently reminds me of the tin man from the Wizard of Oz. That will involve using range generated by joystick and trigger buttons rather than the simply the press and release.