Over Christmas I managed to follow this tutorial to create a HID joystick using the Leonardo.
The Windows 11 machine I connected it to recognized it as a HID device, and I was able to configure each button in the Game Controllers interface.
I took a break from all Arduino related stuff and now, 3 months later, the device is not coming up as a HID device.
I am also not seeing the Leonardo in the Arduino IDE.
Things I have tried:
Multiple USB cables
Tapping the reset button once or twice, resulting in the LED flashing at ~300 ms intervals for a few seconds. (I counted 14 blinks.)
The Device Manager (with "Show hidden devices" enabled) does not list the Leonardo.
I also wrote a simple PowerShell script to monitor for changes to the COM ports while resetting/rebooting. No changes are detected. (I am currently scanning at 1 second intervals.)
If it's stuck unable to Upload - you can hold the Reset down, start a blink (MRE) Upload and wait to release the Reset as soon as the "Uploading.." message is displayed.
I know that you tested with multiple USB cables but make sure that they are data/sync cables. Some people have the bad luck that they tried several cables and they were all charge-only (or damaged).
If it's stuck unable to Upload - you can hold the Reset down, start a blink (MRE) Upload and wait to release the Reset as soon as the "Uploading.." message is displayed.
I tried this - with pushing the reset button at different timings relative to the "Uploading" message, but to no avail.
I know that you tested with multiple USB cables but make sure that they are data/sync cables. Some people have the bad luck that they tried several cables and they were all charge-only (or damaged).
The Leonardo was already connected to the original USB cable I used for uploading the sketch so I thought the likelihood that it would be the cable was quite small.
It's not a matter of various. but process. Oh well, best of luck.
Sorry, I am new to all this. Could you be more specific what you mean about process? The LED is blinking, which I guess means it is ready to have a new sketch uploaded. But as long as the COM port doesn't show up in Windows, that's not possible.
So it seems like using another Arduino as an ISP is the way to go.
I gave up on the Leonardo, but received a brand new Arduino Micro (in the official packaging) from Amazon today. The device shows up as "SparkFun Pro Micro" in the Arduino IDE (2.3.4) by default.
To test, I uploaded the Blink sketch to the Micro on COM5.
After uploading the Blink sketch and unplugging and plugging in again, the device is not visible as a COM port anymore.
I can see a "Unknown USB Device (Device Descriptor Request Failed) when it is plugged in. (And there is an audible sound when plugging it in or out.)
If I use the "hold down the reset button until the sketch is compiled" method i am able to upload new sketches.
I am starting to think there is something wrong with my Windows 11 installation or the USB ports on my PC.
There are two versions of the SparkFun Pro Micro, 8MHz/3.3V and 16MHz/5V. You might have the former. Because it's running on a lower speed it will not correctly honour the operating system's request to identify itself.
The trick with the Pro Micros is to double tap the reset button when the IDE reports the memory usage. That will invoke the boot loader which is programmed for the correct frequency. It's strange that keeping the reset pressed as you did actually allowed you to successfully upload; the would indicate Leonardo behaviour.
Double tap the reset on your board. The L-LED should fade in/out for approximately 8 seconds.
During that time, check the VID and PID in Windows device manager.
Thank you. I appreciate this. I tried to double tap the reset button, but the Hardware Ids list does not seem to be refresh. I will try the PowerShell script again to capture all the changes to the Hardware IDs (if any).
Open device manager and expand the ports entry.
Double tap the reset on the board.
The ports entry will give you a new entry for your board.
Double click the new entry, go to the details tab and select the Hardware Ids.
That's the boot loader. So indeed an Arduino Micro. The "run" mode of the Arduino Micro should have VID 2341 and PID 8037.
I'm not quite sure what you mean by that; the IDE selects what you told it to use. Do you have the SparkFun AVR board package installed? If so and when you program the board as the SparkFun Pro Micro it will get the VID and PID of the SparkFun Pro Micro..
As said, the SparkFun Pro Micro comes with two versions; if you selected the SparkFun Pro Micro under tools → boards and you did select the 8MHz version under tools → processor it will explain why you can't upload without using the reset tricks.