BLE gamepad library

I created a library called gamepad-ble to use a Bluetooth Low-Energy (BLE) gamepad to control your Particle project.

Right now, the library works with the Xbox Wireless Controller (the 3 button model). It's the only BLE gamepad I found. All other wireless gamepads (Playstation, Nintendo, 8bitdo) all use Bluetooth classic which isn't supported by Particle devices.

The Xbox controller pairs with the Photon 2, but I'm getting an error when pairing with an Argon or Boron, so the library is for Photon 2 only for now.

For fun, here's the project I'm using this in. I turned my kids' PowerWheel into a remote controlled drift car driven by a 5' tall skeleton for Halloween. Spooky! :skull::jack_o_lantern:

6 Likes

no wayyyy! and you are going to be driving this around scaring little ones.
Sounds like fun, thank you for sharing your work.

1 Like

Very cool.
I imagine the Photon2 replaced switches for forward and reverse.
What's involved for the steering, stepper motor?
Thanks for sharing, especially the BLE code.

1 Like

Just driving it around during the day made the neighborhood kids nervous so imagine during Halloween night after I add some red LEDs. :grin:

I used a big motor controller for the wheel motors so I can do soft start and drive slowly. For the steering, I 3D printed a gear sprocket that is connected by a chain to a REV Robotics motor that has an integrated encoder. There's a control loop in software to make the steering follow the joystick. The wheels return to the center when the joystick is released.

Here's the code for the actual project.

2 Likes

This is awesome @jvanier

Every year my son does some sort of electronics trick or treat thing. Last year was a slide with lights and sound playing etc. he wanted to make a train track this year and have it come out around the corner. This is so much better/easier and way cooler! We might just replicate exactly your project instead.

So cool and thanks for sharing!