Put this line into setup(),
int buttons[0] = 2;
as this
buttons[0] = 2;
to put a value into the 0 location.
You don't need to declare the array twice, which is what the compiler is telling you.
Put this line into setup(),
int buttons[0] = 2;
as this
buttons[0] = 2;
to put a value into the 0 location.
You don't need to declare the array twice, which is what the compiler is telling you.