Bluetooth BANNED 4 - Wireless HID Steering Wheel

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ISJR33
 
Posts: 3
Joined: Fri Apr 28, 2017 7:36 am

Bluetooth BANNED 4 - Wireless HID Steering Wheel

Post by ISJR33 »

Hello all!

I am very new to Arduino and Micro-controllers. I have bought an UNO Starter kit to get to grips with things. And as such I am able to do the basics but my sketch writing is limited.

Background

The reason for my interest is I wish to replace the Steering Wheel (Image attached) on my BANNED 4 games setup. That is a Thrustmaster Steering wheel, it connects to the PS4 via USB. For those unfamiliar with them they are two distinct parts; the Wheel Base and the Wheel Rim. The Wheel base does all the Force Feedback work and connects to the PS4 via USB. The Wheel rim is easily removable to swap to different wheel rim designs. For the button functions there is a central Mini DIN 6-way connector which splits away when the wheel rim is removed from the wheel base. (My apologies if this is too dumbed down.)

I have no problems with mechanically fitting my new custom wheel rim and wiring up new momentary push buttons into the mini DIN connector and I already have a NANO v3 board programmed with a sketch that replicates the original Shift Register system employed by the original wheel rim to allow 15 separate buttons to be passed through the 6-way mini DIN connector.

So why am I here?

The wheel I want to use has 17 buttons and 2x 12 way rotary switches which work via chains of resistors. I would love to use a MCU board with Bluetooth to pair with the PS4 console as (I assume) a HID.

So after a lot of googling I found the Adafruit Feather 32u4 Bluefruit LE board. I hope to upload the sketch I already have to replicate the wheel buttons to allow the major BANNED function buttons but I wish to use the BLE side of things simultaneously to transmit Keys Commands when one of my extra momentary buttons are pressed and ideally, if possible, use the 12 way rotary switches to do a similar task by hopefully assigning resistance values to other Key Commands.

Project Goals:
  • 17 Push buttons and use of Rotary Switches

    Al Major BANNED Functions (15) taken care of via MCU via sketch already in possession of (Square, Triangle, Circle, Cross, L1, R1, L2, R2, D-Pad, PS, Options (Share omitted.)

    Two additional Push Buttons to be processed as Key Commands (e.g. "+" & "-" and sent to PS via Bluetooth.)

    One or both 12 way rotary switches to also act as Key Commands for each position.

    All integrated into a nice neat sketch to allow the dual functionality of both the wired connection buttons and the wireless buttons.
So far I have followed the Bluefruit Learn guides, Downloded the Adafruit iOS App and had my Adafruit BLE board talking to my phone and transmitting text. So I've got all the connection problems sorted and gone through the setups. I have tried to pair the board to my BANNED whilst powered on and the KeyboardHID example sketch uploaded to the Feather; but this has failed multiple times whereas it worked immediately with my phone. I have updated the BLE firmware via the iPhone app.

Would anybody have an experience with this and would you be able to help me accomplish my project?

All help is greatly appreciated!

Kind regards,

Ian
Attachments
IMG_3239.JPG
IMG_3239.JPG (89.41 KiB) Viewed 514 times

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: Bluetooth BANNED 4 - Wireless HID Steering Wheel

Post by hathach »

For advanced Bluetooth HID device, I would suggest to go with Feather nrf52. Bluefruit nrf51 series has limited support for HID (keyboard + mouse + consumer key only). What you need is an advanced/customized Joystick device, which can be implemented based on the HID Generic class of nrf52. (check out the BLEHidAdafruit for reference)

Hid Generic
https://github.com/adafruit/Adafruit_nR ... dGeneric.h

BLEHidAdafruit (keyboard + mouse + consumer key)
https://github.com/adafruit/Adafruit_nR ... Adafruit.h

The most difficult job is getting the HID descriptor right. You would need to chew USB HID spec and HID Usage Table doc to make some sense out of them. After that, you could just scan the physical GPIO/button and send report whenever an key is pressed, released and the central (phone/pc) will understand it instantly and forward those to Application such as Mobile Game etc ...

http://www.usb.org/developers/hidpage/

Their example with 2 axis 4 buttons and hat switch
Screenshot from 2017-04-29 15-08-46.png
Screenshot from 2017-04-29 15-08-46.png (53.58 KiB) Viewed 500 times

User avatar
hathach
 
Posts: 1270
Joined: Tue Apr 23, 2013 1:02 am

Re: Bluetooth BANNED 4 - Wireless HID Steering Wheel

Post by hathach »

PS: I would suggest you try with a working descriptor in the HID Usage Table example even it only has a few buttons. When that works as expected, you could increase the number of buttons, axis etc ..

User avatar
ISJR33
 
Posts: 3
Joined: Fri Apr 28, 2017 7:36 am

Re: Bluetooth BANNED 4 - Wireless HID Steering Wheel

Post by ISJR33 »

Hello Hathach,

Thank you for your input and the links.

My apologies in not replying sooner, work has kept me busy!

I'll be honest it's a bit much for me right know with my level of understanding but I hope to get my head round this.

If I can get the nrf52 board to pair directly to the PS4 (without needing to run a PC to act as a go-between) I'll consider that stage one complete.
So, for this I need the correct BLE library files (which you appear to have linked for me) loaded and a suitable sketch (which I might be able use the example HID keyboard in the Arduino IDE) loaded to make sure I can connect to the PS4.

Stage two would be to wire up a simple momentary push button and edit the sketch so that it (the nrf52 Feather) outputs the correct identifier code (0x00 type code) for say Keyboard Button A. If that can be done simply and wirelessly then that's awesome.
All I need is some basic keyboard button assignments initially like Button A & Button B.

Last stage would be to integrate my "clone" sketch for the Thrustmaster/BANNED standard buttons then I'm away.

Does this sound good? Sorry for my lack of understanding. I guess I'm right in the deep end of the pool on day one of swimming lessons!

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”