Arduino acting as a HID

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.

-Over9000

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 : Teensy USB Development Board. 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

http://www.practicalarduino.com/projects/virtual-usb-keyboard

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.