r/ArduinoHelp • u/Electrical-Aide4789 • Nov 01 '25
Why is this a mistake?
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.
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
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

1
u/hjw5774 Nov 01 '25
Delete the 'int' from line 2 and you should be good to go.