0

I am looking for advise with building a 16 key joypad
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

I am looking for advise with building a 16 key joypad

by avior on Fri Jul 19, 2019 12:58 pm

hi i have got used to programming Bluefruit EZ-Key - 12 Input Bluetooth HID Keyboard Controller
but i need something wireless or Bluetooth to program 16 keys could someone please tell me what adafruit to get
something easy to build which react to gaming like Mortal kombat on Pc

thanks

avior
 
Posts: 22
Joined: Tue Sep 01, 2015 4:57 pm

Re: I am looking for advise with building a 16 key joypad

by adafruit_support_mike on Sat Jul 20, 2019 6:54 pm

Any of our Bluefruit devices will work.

The main challenge is deciding how to handle that many keys. USB HID packets are always 8 bytes long: 1 byte for modifier keys, 1 zero byte, and 6 bytes for key ID codes. If you want to use more than 6 keys, you have to generate multiple HID packets, or make a single packet that has the subset of key codes you want.

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: I am looking for advise with building a 16 key joypad

by avior on Sun Jul 21, 2019 9:56 am

adafruit_support_mike wrote:Any of our Bluefruit devices will work.

The main challenge is deciding how to handle that many keys. USB HID packets are always 8 bytes long: 1 byte for modifier keys, 1 zero byte, and 6 bytes for key ID codes. If you want to use more than 6 keys, you have to generate multiple HID packets, or make a single packet that has the subset of key codes you want.


so would this Bluefruit EZ-Key do the same or 12 is the limit

thanks

avior
 
Posts: 22
Joined: Tue Sep 01, 2015 4:57 pm

Re: I am looking for advise with building a 16 key joypad

by adafruit_support_mike on Sun Jul 21, 2019 2:46 pm

The EZ-Key sent a separate HID packet for each keypress. If that works for you, writing the code is easy. The down side is that the computer will inly recognize one keypress at a time. Each HID packet cancels the information in the previous one.

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Re: I am looking for advise with building a 16 key joypad

by avior on Wed Jul 31, 2019 3:17 am

adafruit_support_mike wrote:The EZ-Key sent a separate HID packet for each keypress. If that works for you, writing the code is easy. The down side is that the computer will inly recognize one keypress at a time. Each HID packet cancels the information in the previous one.


oh ok that no good then for press 2 key at same time could you please suggest with one to get

thank you

avior
 
Posts: 22
Joined: Tue Sep 01, 2015 4:57 pm

Re: I am looking for advise with building a 16 key joypad

by adafruit_support_mike on Wed Jul 31, 2019 12:39 pm

Any BLE device will do the same thing, so you’ll have to write code that combines the keys you want to press in a single HID packet.

The earlier posts in this thread have sample code showing how to do that.

adafruit_support_mike
 
Posts: 59205
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.