Go Down

Topic: Arduino acting as a HID (Read 619 times) previous topic - next topic


Hi all,

I know somebody has probably done this out there and it may be difficult, however I want to have an Arduino acting as a USB mouse. I want to be able to plug it into any PC and have it be recognized as a generic mouse with x/y co-ordinates + hopefully scroll/clicking. I'm not sure if I would need a shield with another USB output or can do this from the USB connection already on my UNO/Mega. Any help or a point to references would be vastly appreciated.



Possibly it could be done with an Uno since it has an ATMEGA32U4 chp on board but the easiest way would be with a Teensy board : http://www.pjrc.com/teensy/index.html. There are a number of HID projects on the Teensy website and it can be programmed using the Arduino IDE. Plus it has a very small form factor (smaller than a Promini, I think.)


There are other projects out there as well using the ATMega328P chip as a USB device, such as the Virtual Keyboard here


And someone has made an adaption, not sure if it's working with the latest IDE



Apart from the Teensy option given above you have following 2 options to choose from:

1) You can use a PS/2 mouse and code the arduino with the PS/2 protocol.

2) Using a USB host shield (goto >> circuitsathome.com website) This is the easiest and i want you should not go for it because easy ways let learning less.
"Real Men can Accomplish  Anything"

- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੁਂ!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131