Hey wenn i connect my arduino leonardo nothing but the sound of the classic win 11 usb connect sound plays but wenn i go to select the board in the arduino ide than it does the win 11 disconnect and reconect sond and a notification pops up saying that the last plug in device was not recongnized and in the bottom right corner it says "Arduino Leonardo on COM14 [not connected]" and i worry if it had soemthing to do with my last code where one line said "int PIN_Read = map(analogRead(Pin),0,0,0,300);"
I moved your topic to an appropriate forum category @mauscraft.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.
I doubt it's that specific line. But your problem is likely to be caused by a bug in your sketch. The code that is uploaded contains functionalities that are used to identify the board and to react on the software reset issued by the IDE. Your sketch can e.g. overwrite variables that are used by those functionalities resulting in the board either not being recognised properly or not reacting on the software reset.
First question is what happens when you double tap the reset; does the L-LED fade in-and-out for approximately 8 seconds? And what happens at the same time in Windows device manager? You should see a port named Arduino Leonardo (boot loader). After that it should fall back to a normal Arduino Leonardo (which I think does not happen in your case).
If you get the described behaviour, you can try the following to recover the board.
- Connect your board.
- Select the Leonardo.
- Upload the blink sketch.
- When the IDE reports the memory usage, double tap the reset button.
If this fails to upload, you might be too late with the double tap. In that case you can enable verbose output during compilation under file → preferences in the IDE. When the IDE shows you the line "Linking everything together" you can double tap the reset of the Leonardo.
If that also fails, the next option is to select a different port. If the IDE shows a COM1 you can select that. If you have an Uno/Mega/Classic Nano or a serial-to usb converter, connect it to the PC as well as the Leonardo. Select the port of that device. Keep the board as Leonardo ! Next start the upload and when the IDE reports the memory usage double tap the reset of the Leonardo.
It's important to upload an innocent sketch (like the blink sketch) during the recovery !!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.