So, I learned about arrays on the Arduino. I understand how they work, but I was looking at an example in the keypad library, and I saw that there was an array, and it had 3 arrays in it. It looks like this:
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
How does this work? Why are there 2 bracket things instead of only 1? Are these sub arrays? Please explain to me how this works! Also, about the brackets, I was told that you can put the amount of things that are going to have in the array in the brackets, but it wasn't necessary because the Arduino could count them. Is there ever a situation where you would need to put a number in those brackets? in the example, the rows and columns go in the brackets, but is that necessary?