Can I get my Arduino Micro to be JUST an HID joystick, nothing else?

I am trying to transmit a bunch of joystick devices over USBIP. One of them is made using an Arduino Uno and UnoJoy to turn its 16u2 serial chip into an HID joystick device. This one transmits great.

The Arduino Micro does not. It's kind of backwards, I expected it to work better since it is designed to be an HID joystick. But I suspect the problem is because it is trying to be a bunch of other things too, like a serial device - the 16u2 firmware modification I have done to the Uno disables its ability to act as a serial device, for example.

Is there a way to get the Micro to similarly stop trying to be a Micro and just be a permanent joystick device?

1 Like

YES! simply change the code so it does what you want.

1 Like

Yes but I wasn't sure which code to change, but that's okay, I found it! Here is the answer for any future googlers:

You need to edit USBDesc.h and uncomment the //#define CDC_DISABLED line.

I am using the old Arduino 1.8.5 IDE on Windows 10, so for me, USBDesc.h was located here:

%localappdata%\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino

I uncommented that line, so that CDC_DISABLED was now defined, saved the file, restarted the Arduino IDE 1.8.5, and reflashed my firmware to my Arduino Micro.

IT IS VERY IMPORTANT that you undo the changes to USBDesc.h after, otherwise you will disable the serial communication in any other device you flash with Arduino IDE as well!

Now it only shows up as a USB joystick, nothing else, not an Arduino Micro, not a serial device ready to be flashed. This means it no longer confuses old/obscure devices, like being able to use it as a bootable keyboard on an old PC. Or my case, being able to transmit it over USBIP. It works now!

The downside is that it is now semi-permanent. In order to update my code on the Micro, I will need to flash it using an ISP programmer (I can make one out of an UNO) and the pins on top.

Thanks to this guy for his confusing expert-level instructions, I hope I dumbed them down enough if there's more people at my skill level:

1 Like

Good Job!

Did you try if double-tap reset will help. That should invoke the bootloader. You can use your Uno that you wanted to use as a ISP programmer.

  1. Connect both the Micro and the Uno to your PC.
  2. Select the Micro as the target board.
  3. Select the port of the Uno.
  4. Start the upload.
  5. When the IDE reports the memory usage, double-tap the reset.

For the old IDE (as you are using), the above will also work. But you can do it slightly different (no need for Uno).

  1. Connect the Micro to your PC.
  2. Select the Micro as the target board.
  3. Double-tap the reset of the Micro; you have approx 8 seconds to select the bootloader port.
  4. Start the upload.
  5. When the IDE reports the memory usage, double-tap the reset (again).
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.