Arduino Forum

Topics => Device Hacking => Topic started by: LarsJanssen21 on Nov 25, 2016, 09:37 pm

Title: Reading USB keyboard input
Post by: LarsJanssen21 on Nov 25, 2016, 09:37 pm
Hey everybody,

I've gotten a question regarding receiving data via a usb module.

I have got a usb to ttl module with which I would like to read inputs from a usb keyboard. I'm not sure how to go about this with the current state of the IDE.

If someone could point me in the right direction that would be very much appreciated.
Title: Re: Reading USB keyboard input
Post by: Riva on Nov 27, 2016, 07:54 am
Do you mean a USB keyboard is connected to the USB2TTL module that is connected to the Arduino (what model?) and you what to read/decode key presses? Or is the keyboard connected to a PC that is connected to an Arduino via the USB2TTL module.

If you want to connect a USB keyboard to the Arduino then you either need an Arduino with a USB host port or a USB host module like this (http://www.hobbytronics.co.uk/usb-host-board-v2?keyword=usb%20host) with HID keyboard stack. A USB/TTL module will not read a HID keyboard.
Title: Re: Reading USB keyboard input
Post by: Dobert on Dec 08, 2016, 10:26 am
thank you Riva! especially for the link :)
Title: Re: Reading USB keyboard input
Post by: AllanGH on Aug 30, 2017, 05:18 pm
Just as a matter of reinforcing the earlier "thank you", I will echo my own thanks for the suggestion and link.

Solutions like this live long lives.

HobbyTronics just received a new order for the relevant USB Host hardware.