I just bought for the first time an arduino pro micro.
I then tried to upload something on it with the IDE, selecting Arduino/Genuino Pro micro, but I got this error:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/USBCore.h:137:2: error: 'u16' does not name a type
u16 usbVersion; // 0x200 or 0x210
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/USBCore.h:142:2: error: 'u16' does not name a type
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/USBCore.h:143:2: error: 'u16' does not name a type
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/USBCore.h:144:2: error: 'u16' does not name a type
u16 deviceVersion; // 0x100
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/USBCore.h:155:2: error: 'u16' does not name a type
u16 clen; // total length
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/USBCore.h:186:2: error: 'u16' does not name a type
I searched a lot on internet, but i didn't find anything to help me. I tried selecting Arduino Leonardo, or the Sparkfun Pro Micro board in the Tool/Board.
Thank you very much for reading me, and for answering :)
I then tried to upload something on it
What is the "something"? Do you mean that you get this error no matter what you try to upload (includeing File > Examples > 01.Basics > BareMinimum
), or that you get it only from a specific code?
If the latter:
Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</>
button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's ok to add it as an attachment. Don't put your code in some external file service like dropbox, etc. We shouldn't need to go to an external website just to help you. I do feel it's reasonable to post a link to code hosted on GitHub or similar code hosting sites since that's an platform specifically designed for this sort of thing
Please always do a Tools > Auto Format
on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor then you will not have access to this useful tool. I recommend using the standard Arduino IDE instead.
When your code requires a library that's not included with the Arduino IDE please post a link (using the chain links icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries
) then say so and state the full name of the library.
Thank you for replying.
I should have say it before , sorry.
I'm actually trying to upload the BearMinimum file.
I also use the desktop ide.
OK, you definitely shouldn't be encountering that error. It seems like your installation of the Arduino IDE might have been corrupted. I recommend you to uninstall it, install a fresh copy downloaded from http://www.arduino.cc/en/Main/Software (http://www.arduino.cc/en/Main/Software), and then try again. If that doesn't solve it then we can try another possible solution.
Yes it worked by changing the IDE.
I upload it from an other computer and it worked.
Thanks a lot :)
I'm glad to hear it's working now. Enjoy!
thanks for the help, me also problem as you