I want to make a device that reads two USB devices and then sends the data down the USB cable from the Arduino to the PC and those signals correspond to mouse and keyboard inputs, I have seen the mouse and keyboard emulation sketches, I would like to do something that allows real input acquisition and push interpreted input data down the USB to a PC.
So I would like to know how I would go about reading the USB inputs to the Arduino when it has no USB A sockets, can I just get some USB A sockets and wire them up to pins on the Arduino for reading? If so, what pins do I use?
16U2 can be programmed to act like HIDs to interact with keyboard, mouse, etc , yes?
So program two Unos up to talk to a device, and talk to each other, add USB/Serial module (FTDI Basic or equivalent) to one so it talk via serial to the PC.
I want to plug a two HID's in to USB sockets, mainly because these HID's have USB plugs on them, I want to be able to have the digital pins used to read the signals on theses ports and deal with them in the following fashion.
If a signal has been read on the USB input that corresponds to a key like 'a' then the program needs to send that signal to the PC as a keyboard device.
if a signal has been read on the USB input and it is a mouse movement, then the signal is to be sent directly to the PC as a mouse without any modification.
So my query is how would I go about reading a USB input from a HID then outputting signals the the PC can understand?
I have an Arduino UNO that has been lent to me and I would like to make a project on it that I can later follow up.
So ... do I wire up a couple of USB plugs so that power comes from the power pins and the signal goes to the Digital (PWM) as inputs? I am making the assumption that these inputs would need to be PWM inputs.
Also I am a beginner at this, whilst I appreciate replies, please not that I need things in plain English, thanks.
Paul__B:
The device you describe is called a "USB hub".
It is available for $3 down at the local knick-knack shop.
I don't quite see the point in your project, another form of "re-inventing the wheel".
The HID that I am using can't communicate directly with the PC, thats why I need to have a program in the arduino to do that job of taking a signal and turning it in to a keyboard set of letters that can represent the device input.