1

Is there any "easy" way to emulate USB keyboard or gamepad using digital pins on Arduino Mega? I looked at Uno-Joy/Mega-Joy, but I dont find firmware changes appealing.

asked Mar 3, 2018 at 18:24
2
  • 1
    No. There is not anything like that. Commented Mar 3, 2018 at 18:49
  • @Delta_G - that's not really true. It is possible, see V-USB. But perhaps not "easy". Reprogramming the ATmega8u2/ATmega16u2 on boards having that for their USB-serial interface is also an option. Commented Mar 3, 2018 at 19:02

1 Answer 1

1

There is (or was) an implementation of software-only USB for the Arduino. I think it was called V-USB, though I am having trouble finding it now.

I think it may be this library though nothing has happened with that for a number of years.

Personally, I wouldn't recommend it, though, and would suggest using a board with a real USB interface, such as the Arduino Leonardo, chipKIT Lenny, or Teensy 3.x.

answered Mar 3, 2018 at 19:03
9
  • How much easier would it be with different hardware, say Leonardo? Commented Mar 3, 2018 at 19:12
  • 1
    Much easier. You just use the Joystick library: github.com/MHeironimus/ArduinoJoystickLibrary Commented Mar 3, 2018 at 19:13
  • Nice. However, there is one more problem: I am using Mega at the moment, because I need to read voltages off 8 different sources and make it to digital output. Is there any device that would have at least 8 analog pins? Commented Mar 3, 2018 at 19:17
  • Teensy 3.6, and you don't want the Joystick library - it has its own USB stack that works differently: pjrc.com/teensy/td_joystick.html Commented Mar 3, 2018 at 19:20
  • Thanks, but its a bit pricy, it would be cheaper to use two arduinos. Commented Mar 3, 2018 at 19:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.