Go Down

Topic: Multiple key presses using built in USB keyboard library? (Read 206 times) previous topic - next topic

smartroad

I have brought myself an Arduino Micro to make a SNES joypad to USB converter for my RetroPie rig. The problem that I am hitting is the built in keyboard library not allowing more than one key to be pressed at a time (ignoring modifier keys).

I reckon that for the two SNES pads I would need to be able to send at least 12 buttons simultaneously (2 directional, two fire buttons and 2 shoulder buttons for each pad) going to an ideal of 16 to allow all 4 fire buttons to be pressed. I had looked at the Teensy as that does say it can send 6 keypresses simultaneously, I had hoped that the keyboard.pressed() and keyboard.release() would have offered the same functionality, but when you call another key to be pressed it releases the previous one.

During my investigation I have also found a couple of libraries that would allow the Arduino to be a joystick directly, however these seem to only be setup for those Arduino's with the second processor for USB communications. I have no idea on how to make them compatible with the Micro (or Leonardo).

I am at a loss as to how to proceed now and would appreciate any assistance.

smartroad

I have found a hack to enable a joystick with the Micro :) http://www.imaginaryindustries.com/blog/?p=80

Works well, although you seem to loose keyboard functionality as a result, or I am doing something wrong!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy