Using Arduino Micro - cannot load example sketch

Using genuine Arduino Micro. Attempted to upload example sketch. Error message.

Using Windows 10
Arduino IDE 1.8.13

Error message appears as below.

I have no experience with programming or electronics.

What does the error message mean?

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Micro"

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\DesktopAdmin\Documents\ArduinoData\packages -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\DesktopAdmin\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\DesktopAdmin\Documents\Arduino\libraries -fqbn=arduino:avr:micro -vid-pid=2341_8037 -ide-version=10813 -build-path C:\Users\DESKTO~1\AppData\Local\Temp\arduino_build_42352 -warnings=none -build-cache C:\Users\DESKTO~1\AppData\Local\Temp\arduino_cache_698793 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avr-gcc\4.8.1-arduino3 -prefs=runtime.tools.avr-gcc-4.8.1-arduino3.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avr-gcc\4.8.1-arduino3 -prefs=runtime.tools.avrdude.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avrdude\6.0.1-arduino3 -prefs=runtime.tools.avrdude-6.0.1-arduino3.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avrdude\6.0.1-arduino3 -verbose D:\Arduino\arduino community project\understanding and using buttons\KeyboardLogout_modified_sketch_windows\KeyboardLogout_modified_sketch_windows.ino

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\arduino-builder -compile -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\DesktopAdmin\Documents\ArduinoData\packages -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\DesktopAdmin\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\DesktopAdmin\Documents\Arduino\libraries -fqbn=arduino:avr:micro -vid-pid=2341_8037 -ide-version=10813 -build-path C:\Users\DESKTO~1\AppData\Local\Temp\arduino_build_42352 -warnings=none -build-cache C:\Users\DESKTO~1\AppData\Local\Temp\arduino_cache_698793 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avr-gcc\4.8.1-arduino3 -prefs=runtime.tools.avr-gcc-4.8.1-arduino3.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avr-gcc\4.8.1-arduino3 -prefs=runtime.tools.avrdude.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avrdude\6.0.1-arduino3 -prefs=runtime.tools.avrdude-6.0.1-arduino3.path=C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avrdude\6.0.1-arduino3 -verbose D:\Arduino\arduino community project\understanding and using buttons\KeyboardLogout_modified_sketch_windows\KeyboardLogout_modified_sketch_windows.ino

Using board 'micro' from platform in folder: C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\hardware\avr\1.6.3

Using core 'arduino' from platform in folder: C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\hardware\avr\1.6.3

Warning: platform.txt from core 'Arduino AVR Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.

Detecting libraries used...

"C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avr-gcc\4.8.1-arduino3/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER="Unknown"" "-DUSB_PRODUCT="Arduino Micro"" "-IC:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\hardware\avr\1.6.3\cores\arduino" "-IC:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\hardware\avr\1.6.3\variants\micro" "C:\Users\DESKTO~1\AppData\Local\Temp\arduino_build_42352\sketch\KeyboardLogout_modified_sketch_windows.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for Keyboard.h: [Keyboard@1.0.2]

ResolveLibrary(Keyboard.h)

-> candidates: [Keyboard@1.0.2]

"C:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\tools\avr-gcc\4.8.1-arduino3/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MICRO -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8037 "-DUSB_MANUFACTURER="Unknown"" "-DUSB_PRODUCT="Arduino Micro"" "-IC:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\hardware\avr\1.6.3\cores\arduino" "-IC:\Users\DesktopAdmin\Documents\ArduinoData\packages\arduino\hardware\avr\1.6.3\variants\micro" "-IC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries\Keyboard\src" "C:\Users\DESKTO~1\AppData\Local\Temp\arduino_build_42352\sketch\KeyboardLogout_modified_sketch_windows.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for HID.h: []

ResolveLibrary(HID.h)

-> candidates: []

In file included from D:\Arduino\arduino community project\understanding and using buttons\KeyboardLogout_modified_sketch_windows\KeyboardLogout_modified_sketch_windows.ino:32:0:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries\Keyboard\src/Keyboard.h:25:17: fatal error: HID.h: No such file or directory

#include "HID.h"

^

compilation terminated.

Using library Keyboard at version 1.0.2 in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries\Keyboard

exit status 1

Error compiling for board Arduino Micro.

The problem is you're using an incredibly outdated version of the Arduino AVR Boards platform of the Arduino Micro for some reason. Please do this:

  • Tools > Board > Boards Manager
  • Wait for the update to finish.
  • From the list of available boards platforms, click on "Arduino AVR Boards".
  • Click the "Update" button.
  • Wait for the update to finish.
  • Click the "Close" button.

Now try uploading your sketch again.

Uninstalled IDE
Cold boot window 10 pc
Reinstalled Arduino IDE.

Compiles and runs the example sketch now.

Thanks for the reply pert!

I usually try a google search before posting to see if anyone else had this issue. Also searched the arduino forums.

I originally wanted to get pro micro to work. I thought if I used a older IDE version the pro micro board selection would appear. This is why the version was so old. This did not work for me. So I removed the old version of the IDE and installed the newest one.

I have switched to Arduino micro to match the board selections for the newest IDE version. When I try to use the micro board to upload the sketch it gives me an error.

No previous experience with electronics, arduino or programming.

Sorry I did not put the code in the </>

scott974:
I usually try a google search before posting to see if anyone else had this issue. Also searched the arduino forums.

Thanks. This one is not so common because it only happens when using an old Arduino AVR Boards version with a new version of the Keyboard or Mouse library. So probably there aren't so many search results for it.

scott974:
When I try to use the micro board to upload the sketch it gives me an error.

Please post the error output.

scott974:
Sorry I did not put the code in the </>

It's OK, just try to remember to do it in the future when posting code, compiler errors/warnings, etc. It just makes it easier for the other forum members to read and do things like copy the text to their IDE. In some cases, if you don't use the code tags the text is interpreted as markup by the forum software and corrupted, which can result in confusion and unexpected emoji.

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