Go Down

Topic: Query about how best to move forward with an idea for a project. (Read 3039 times) previous topic - next topic

MarkG

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?


CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

MarkG

Ok, I guess I should keep it simple...

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.

Magician

Arduino can't directly communicate with USB device. But you can buy arduino USB shield.

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".

MarkG


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.

So buying a USB Hub will not solve the problem.

Paul__B

So we are "drilling down" into the real problem.  What is this rogue HID?

Magician

Quote
The device you describe is called a "USB hub".
It is available for $3 down at the local knick-knack shop.

Unbelievable price, could you post a link?

MarkG


So we are "drilling down" into the real problem.  What is this rogue HID?



I will come back to this when someone can get a USB shield, no point in going in to this until I have got one.

Paul__B


I will come back to this when someone can get a USB shield, no point in going in to this until I have got one.


As it suits you.  Bye!


Quote
The device you describe is called a "USB hub".
It is available for $3 down at the local knick-knack shop.

Unbelievable price, could you post a link?


Well, over here, it is "The Reject Shop", but they are not exactly online!

USB 1 hubs (adequate for keyboard/ mouse and most printing) are pretty cheap - even USB 2.  Have you not looked at eBay lately?


Magician

Quote
USB 1 hubs (adequate for keyboard/ mouse and most printing) are pretty cheap - even USB 2.  Have you not looked at eBay lately?
Show me how to connect USB hub to arduino.

I my replay I was refering to arduino USB shield, that works over SPI bus.
https://www.sparkfun.com/products/9947 

Go Up