Problems with Mega 2560 and IDE

Hi there,

I'm stupid new here. I've played with Arduino IDE in the past; However, that was basically plug and play with the 3D printers.

Now, I'm trying to make a 49 button button box for flight sim. I have an Mega 2560. When I load IDE with wim_s_button_box_code.ino and make the changes I need. I select verify and it tells me that keypad.h: fatal error: keypad.h: No such file or directory.

Here are screen shots of the IDE response and how I have the file folder setup.

Any help is greatly appreciated!

Please do not post pictures of code and error messages. Copy the text and post it here in code tags

The Keypad library should be in a folder in the libraries folder of your sketchbook folder. How did you install it ?

Ok, thanks for the info, greatly appreciated! Sorry about the error code photo, should I edit and delete that?

I loaded the .zip libraries and then ran the verify command. This is the error now;
#error The Joystick library can only be used with a USB MCU (e.g. Arduino Leonardo, Arduino Micro, etc.)

Can I assume that the MEGA2560 isn't compatible with this joystick library?

No, leave it as it is otherwise my comment will not make sense. Please use code tags when posting code and/or error messages in future

As you have discovered, the MEGA2560 isn't compatible with Joystick library

Sorry again, already deleted that image........

Is there any joystick.h that is compatible with the 2560?

I have seen this library, GitHub - AlanChatham/UnoJoy: UnoJoy! allows you to easily turn an Arduino Uno (or Mega or Leonardo) into a PS3-compatible USB game controller mentioned but have no experience of it or even if it works

Search the forum for mentions of it to see what others think

1 Like

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