'Error compiling for board Ardunio Uno' - Board is Arduino Pro Mini

Hi there,

I have built a button box using the Pro Micro board, and have followed the guide here - How to Build a Button Box - YouTube

After entering the required code, when I click on verify, the following error message displays (it seems like the software thinks my board is an Uno?):

Arduino: 1.8.20 Hourly Build 2022/04/25 09:33 (Windows 10), Board: "Arduino Uno"





















In file included from C:\Users\dharr\OneDrive\Documents\Arduino\sketch_jun28b\sketch_jun28b.ino:2:0:

C:\Program Files (x86)\Arduino\arduino-nightly-windows\arduino-nightly\libraries\ArduinoJoystickLibrary-master\src/Joystick.h:32:2: error: #error The Joystick library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.).

 #error The Joystick library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.).

  ^~~~~

exit status 1

Error compiling for board Arduino Uno.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Does anyone have any suggestions?

Many thanks

Have you selected the right board in the ide

Is it really a Leonardo?

In the thread title, you say Pro Mini. What do you actually have?

Thank you so much! As you can see I'm still learning. Everything is working great. Thanks again to both of you for commenting so quickly.

Mark your thread as resolved and let us know what solution so others can learn

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