Arduino Forum

Using Arduino => Installation & Troubleshooting => Topic started by: Marek1 on Dec 12, 2017, 07:48 pm

Title: Error when I verify and I am desperate
Post by: Marek1 on Dec 12, 2017, 07:48 pm
Can you help me with this ?

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Marek1-PC\Downloads\Analog-E-Brake-master\ANALOG_EBRAKE\ANALOG_EBRAKE.ino:8:0:

C:\Program Files (x86)\Arduino\libraries\Joystick/Joystick.h:31: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/Genuino Uno.

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


What I do bad :(
Title: Re: Error when I verify and I am desperate
Post by: AWOL on Dec 12, 2017, 07:49 pm
Quote
The Joystick library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.
i.e. not a Uno
Title: Re: Error when I verify and I am desperate
Post by: Marek1 on Dec 12, 2017, 07:53 pm
What you think?
I dont uderstand you.
Title: Re: Error when I verify and I am desperate
Post by: AWOL on Dec 12, 2017, 07:55 pm
I think that you can't use that library on a Uno, which is what you are trying to do.
The error message is very clear on this.
Title: Re: Error when I verify and I am desperate
Post by: Marek1 on Dec 12, 2017, 07:59 pm
And what I must to do? Can you help me ?
Title: Re: Error when I verify and I am desperate
Post by: AWOL on Dec 12, 2017, 08:00 pm
The error message is also very clear on that
Quote
The Joystick library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.
Title: Re: Error when I verify and I am desperate
Post by: DrAzzy on Dec 12, 2017, 08:05 pm
Use an Arduino Leonardo or Arduino Micro.

Emulating a joystick requires native USB. The Uno does not have native USB. Ergo, you cannot do this project with an Uno.
Title: Re: Error when I verify and I am desperate
Post by: Marek1 on Dec 12, 2017, 08:10 pm
Okey this help me thanks. Arduino Leonardo is Verified and Installed, but how I start Arduino Micro properties ?
Title: Re: Error when I verify and I am desperate
Post by: AWOL on Dec 12, 2017, 08:12 pm
I'm sorry, I don't understand your question.
Title: Re: Error when I verify and I am desperate
Post by: Delta_G on Dec 12, 2017, 09:04 pm
What type of board do you have?  If it is not an Arduino Leonardo or an Arduino Micro then you need to buy another board.  Nothing in the IDE is going to make that code run on any other board. 
Title: Re: Error when I verify and I am desperate
Post by: Marek1 on Dec 12, 2017, 09:31 pm
Thanks for help all working well now.