hi, I did a button box and. I'm a newbie. I don't really know anything about coding. All I did I just copy and past the code from someone on internet and I change the pin# so it can match up my board. I have this error expected unqualified-id before '.' token
Then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read. Few users here will download code.
Also post your error message in code tags. As described in the sticky.
Let's say that I want to help. Since you did not post the error I have to compile the code to see the error. Since you did not post the code properly I must download the code and copy it to my IDE. Then I see these **error all through the code. Not commented. So before I can try to compile it I have to remove or comment all of the **error stuff.
Where in code do you declare an instance of the Joystick class? Look at the examples to see what I mean. A line like:
Joystick_ Joystick;
What Arduino board are you using? Where did you get the Joystick library? Is the board that you are using compatible with the Joystick library?
Read the how to use this forum-please read sticky to see how to properly post code and some advice on how to ask an effective question. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code. Post the entire text of the error message(s).
tidou:
hi, I did a button box and. I'm a newbie. I don't really know anything about coding. All I did I just copy and past the code from someone on internet and I change the pin# so it can match up my board. I have this error expected unqualified-id before '.' token
You didint construct the Joystick object in the code. Please send a link from where you downloaded the Joystick library.
GypsumFantastic:
I seem to remember there's a joystick library out there that instantiates the Joystick object automatically.
The OP needs to check they're using the same joystick library as the example code they borrowed.
Yes, there are many Joystick libraries out there, and the OP could have installed any one. That's why I asked him to send a link from where he bought the library.
ArnavPawarAA: @groundFungus don't be this rude to a beginner.
Maybe it's a language thing (or maybe the response you refer to has been deleted, in which case the admonishment should also be deleted), but I saw nothing rude in @groundFungus' response.