ARDUINO_BUTTON_BOXV2:97:1: error: 'Joystick_' does not name a type; did you mean 'Joystick'?
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
^~~~~~~~~
Joystick
C:\Arduino\libraries\32-FUNCTION-BUTTON-BOX-master\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2.ino: In function 'void setup()':
ARDUINO_BUTTON_BOXV2:103:11: error: expected unqualified-id before '.' token
Joystick.begin();
^
C:\Arduino\libraries\32-FUNCTION-BUTTON-BOX-master\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2.ino: In function 'void CheckAllButtons()':
ARDUINO_BUTTON_BOXV2:124:39: error: expected unqualified-id before '.' token
Joystick.setButton(buttbx.key*.kchar, 1);*
^* ARDUINO_BUTTON_BOXV2:128:39: error: expected unqualified-id before '.' token
_ Joystick.setButton(buttbx.key*.kchar, 0);_
_ ^_ C:\Arduino\libraries\32-FUNCTION-BUTTON-BOX-master\ARDUINO_BUTTON_BOXV2\ARDUINO_BUTTON_BOXV2.ino: In function 'void CheckAllEncoders()': ARDUINO_BUTTON_BOXV2:159:15: error: expected unqualified-id before '.' token Joystick.setButton(rotaries_.ccwchar, 1); delay(50); Joystick.setButton(rotaries.ccwchar, 0); ^ ARDUINO_BUTTON_BOXV2:159:70: error: expected unqualified-id before '.' token Joystick.setButton(rotaries.ccwchar, 1); delay(50); Joystick.setButton(rotaries.ccwchar, 0); ^ ARDUINO_BUTTON_BOXV2:162:15: error: expected unqualified-id before '.' token Joystick.setButton(rotaries.cwchar, 1); delay(50); Joystick.setButton(rotaries.cwchar, 0); ^ ARDUINO_BUTTON_BOXV2:162:69: error: expected unqualified-id before '.' token Joystick.setButton(rotaries.cwchar, 1); delay(50); Joystick.setButton(rotaries.cwchar, 0); ^ Multiple libraries were found for "Joystick.h" Used: C:\Users\User\Documents\Arduino\libraries\Joystick* * Not used: C:\Program Files (x86)\Arduino\libraries\ArduinoJoystickLibrary-master* exit status 1 *'Joystick' does not name a type; did you mean 'Joystick'? This report would have more information with _"Show verbose output during compilation"* option enabled in File -> Preferences._
No i am not posting under two names. I read this one as well trying to seek out help to my issue. I made a button box once before and it worked without any problems. Now im just trying to figure out what the error could be. I dont have alot of experience with this stuff and was hoping someone who had more experince wthatn I do would be able to spot the error or know how to fix the error.
That instructables has a link to the joystick library the sketch was written for:
if you check the readme, it says which boards it is compatible with:
As @groundFungus explained, this library is not compatible with the Nano.
But this is not the cause of the error you're getting (though it will cause another error later if you continue to try to use the Nano with this library). As you can see from the output:
kcduncan:
Multiple libraries were found for "Joystick.h"
Not used: C:\Program Files (x86)\Arduino\libraries\ArduinoJoystickLibrary-master
You have multiple joystick libraries installed on your computer. The Arduino IDE has to pick one of the two. Unfortunately, in this case it picked the wrong one. The solution is to delete this folder:
C:\Users\User\Documents\Arduino\libraries\Joystick
That will cause the Arduino IDE to use the right library that is in the other folder.