I'm new to Arduino, but wanted to check latency issues with emulating a keyboard.
I'm putting together a rotary encoder to emulate KEY_UP_ARROW and KEY_DOWN_ARROW, but given that I'm using windows 7 & USB drivers can be picky, would it be a more reliable bet for me to hack the keyboard that is already present (using relays to close the up & down arrow circuits), or can I achieve low latency with the Arduino USB driver to emulate a(nother) keyboard (It really needs to be low latency & reliable).
I built a sequential shifter, for racing sims (the Logitech G27 doesn't have one), with a Leonardo and have had absolutely no issues. The PC thinks it's a keyboard. If it was laggy it wouldn't be usable.
Thanks so much for replies.
I'll add extra info below
PaulS:
Using which Arduino?
SainSmart UNO R3 ATmega328P
PaulS:
Do you have the skills to do that?
I don't see too many hiccups
PaulS:
What is your definition of "low latency"?
I've had issues with windows delaying the execution of keyboard remaps... from a mouse, together with a wacom tablet... And now I'm thinking of adding another device (they'll all be used in tandem)... So I just wanted to check. I'm estimating I would want to send up to 15 keystrokes/second through the UNO
PaulS:
What are the up and down arrow keys driving?
PaulS:
I don't think that is going to work. Only the Leonardo and Micro can send keystrokes as a USB device.
Aaah, my bad... OK, Micro is in the mail
PaulS:
But that requires processor intervention. Keystrokes are handled as interrupts.
OK, that sounds very promising. Just to double check then... given that arduino doesn't have a windows natively supported driver, can I expect the driver to play well with other devices or introduce other delays?
given that arduino doesn't have a windows natively supported driver
Not true. What Arduino doesn't have is a Microsoft-developed/supported/delivered driver. Which doesn't mean shit, given the quality of some of the crap that is developed just down the road.
can I expect the driver to play well with other devices
Of course.
or introduce other delays?
It should not. The interrupt system doesn't care where the "Hey, there's a keypress event that needs to be handled" interrupt comes from.
Thanks so much Paul for your replies... Much appreciated! Looking forward to putting the Micro together when it arrives
PaulS:
Not true. What Arduino doesn't have is a Microsoft-developed/supported/delivered driver. Which doesn't mean shit, given the quality of some of the crap that is developed just down the road.
Of course.
It should not. The interrupt system doesn't care where the "Hey, there's a keypress event that needs to be handled" interrupt comes from.