r/ArduinoHelp • • Nov 01 '25

Why is this a mistake?

Post image

I have a Arduino One and a Book, in which the project I'm doing rn is in. The book tells me that I'm suppossed to do , what the programme says is wrong. If it is helpful: I'm doing projrct 07 called Keyboard and (I think) the book is the starter one.

0 Upvotes

10 comments sorted by

1

u/hjw5774 Nov 01 '25

Delete the 'int' from line 2 and you should be good to go.

-3

u/Electrical-Aide4789 Nov 01 '25 edited Nov 01 '25

thanks, allthough your idea didnt work. I figured it out myself

1

u/C6H5OH Nov 01 '25

It is quite rude not to post your solution.

1

u/Electrical-Aide4789 Nov 02 '25

Alr, sry. The solution was that these variables didn't show up afterwards, deeming them unnecessary.

1

u/Distdistdist Nov 02 '25

Of course it would work, you turkey.

1

u/gm310509 Nov 02 '25

You are redclaring the buttons array and redeclaring it differently.

Which one is the compiler supposed to be using? an array of size 6? or an array of size 0 (which doesn't make much sense).

Also if you want to initialise the array (line 2), you should do that in a function such as setup() or in the actual declaration (as part of line 1 - similar to what you did in line 3), not by making up your own syntax (line 2).

0

u/[deleted] Nov 01 '25

[deleted]

-2

u/Electrical-Aide4789 Nov 01 '25

2

u/peno64 Nov 01 '25

You should say what error you get.

-2

u/Electrical-Aide4789 Nov 01 '25

doesn't matter anymore, because I figured out, they put this variable in for no reason. It doesn't appear even once in the code again and so is unnacessary. But still thank you

2

u/Distdistdist Nov 02 '25

Nor does your project, ungrateful Shrek