Compilation error!

Hi guys!
I have a library to work with "Leonardo" but I have the Mega2560 only at moment. I tried to upload the sketch but I get the error "library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.)". I really need to have the specific board mentioned on the message? Thanks for any advice!

I didn't write the code and it was written for Leonardo. As I have a Mega2560, I thought in my lack of experience that I could use it with it. But I did understand. Thank you very much .

That error generally occurs when the code needs to emulate a USB device, such as a keyboard or mouse. The library needs a processor with a native USB interface (built into the processor chip itself) in order to appear as the emulated device to the computer.

As I said, thank you so much! And sorry for a noob question! Have a nice day! :relieved:

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