I have an Arduino Uno Rev. 3 and I'm trying to make it so that the Arduino can send a key press / mouse action to the computer. However, these libraries are restricted to a few other versions of the board. Is there another alternative method to doing this without actually pressing any buttons/interacting with the arduino other than USB? Thanks! Link

  • These at fist glance don't seem to be duplicates. However, the original question is basically the same thing, just suggesting a method for doing this. If you feel this isn't a duplicate, or you want another way (ex: PS2 mouse/keyboard support), feel free to edit your question and flag it for moderator attention so one of us can take a look at it. Thanks! Jun 4, 2014 at 1:52

1 Answer 1


It is actually possible, but not easy.

The main MCU on the Uno, the ATmega328, is not capable of using the USB connection at a low enough level to make this possible. The other MCU on the Uno R3, the ATmega16U2, is. You can reprogram it to act as almost any arbitrary USB device.

Since the '16U2 has no connection to digital pins 2 and up or to any of the analog pins, you would have to program it to communicate with the '328 (or an external chip) via UART, and then have another program running on the '328 that would communicate with the other pins.

Note that you will need an external programmer for this, since once the '16U2 is reprogrammed you will lose the ability to program the '328 until you restore the original programming. Using another board running ArduinoISP will work for this.

  • A software approximation to low-speed USB using GPIO pins of the '328 itself and passives to sort of achieve the required USB voltages might be another option. Jun 4, 2014 at 20:14
  • @ChrisStratton: The '328 does not have any access to the USB lines whatsoever, so you'd have to wire in another USB connector. Jun 4, 2014 at 20:51
  • Yes, of course - but that also preserves the original one for development use, both loading programs and having serial debug output (which can be extremely useful when dealing with USB code). Jun 4, 2014 at 20:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.