Hi, I'm trying to use switch()case and I want the variable in switch to be an array. (I'm trying to use 4x4 button pad, so the array is the layout of the keypad. It's a button matrix, if that changes anything?)
The code is far from complete, but this is an error I need to iron out before I can continue.
I'm only going to post the section of the code that's giving me troubles,
int keyPad[4][4] =
{
{1,2,3,10},
{4,5,6,11},
{7,8,9,12},
{14,0,15,13}
};
void setup(){}
void loop()
{
switch(keyPad){
//i have a lot of cases here, obviously
}
}
When I try to verify the code, it says "error: switch quantity not an integer" which confuses me because every number in the ray, obviously, is an integer.
Thanks in advance