Sorry if this seems like kind of a crazy question, but I can't figure out how to search for it correctly on google.
Is it possible to have some setup of microcontrollers that can take two usb inputs and then output them through a single usb to a computer.
As an example:
Usb Keyboard -> Microcontroller One
USB Mouse -> Microcontroller Two
(Microcontroller One + Microcontroller Two) -> Microcontroller Three -> Computer
This may seem strange, but I am just looking on advice as to how I could get the third microcontroller to act as a slave to the computer and also receive data from the other two microcontrollers. Or just a separate way that could work as well.
I'd love to hear any input.
Why not use a USB hub? What function is microcontroller 3 meant to do?
One and Two would be hosts so they would be able to have the keyboard and mouse as their slaves.
One and Two would send the data to Three using some method other than USB.
Three would be operating as a slave so I could connect it to a computer.
((USB -> Host) + (USB -> Host)) -> Some Kind of Communication -> (Slave) -> USB -> (Host)
Haha, well I am too since I am asking here.
Microcontroller One - USB Host to a USB Keyboard
Microcontroller Two - USB Host to a USB Mouse
Microcontroller Three - One and Two will somehow communicate data to this microcontroller.
Microcontroller Three will then act as a USB Slave to a computer.
I think we can see what and even how, the question is why?
So far all we've seen is a system that required three Arduinos to read a keyboard and a mouse when a $10 hub will do that.
Well then, I guess my real question is:
Is it possible to have a single arduino read data from two "slave" arduinos at USB speeds?
The best I think you can do is about 4Mbps as a raw data rate using SPI, minus time taken to deal with the data.
So that's nowhere near USB I think.
Question may also be, why not... use a $4-5 hub, it seems a lot cheaper/easier.
Setting up an USB-host using arduino requires a special shield + writing your own drivers.
There might (I'm not that skilled yet) be an easier way if you could use a PS2 Mouse and keyboard.
Aww well that is too bad.
I have ps/2 keyboard and mouse working right now but i hate ps/2 and want to upgrade.
Well mike, any suggestion as to another solution?
As you haven't actually told us what you are trying to do it is difficult to provide a solution. All you have described is your proposed solution not the problem you are trying to solve.