To mee it seems like you are wasting a lot of space and compute power on something quite simple. If the only values you are wanting to store are 0 and 1 then it is much simpler to use bit manipulation:
//Constants used to compare bit-flags
const byte case1 = 0; //000
const byte case2 = 4; //100
const byte case3 = 6; //110
const byte case4 = 7; //111
const byte case5 = 3; //011
const byte case6 = 1; //001
//Your "mas"
byte mas = 0;
void testPin(int pin, byte bit) {
//Convenient function to test a pin and set or clear a bit accordingly
if (analogRead(pin) > 0) mas |= (1 << bit); //Set bit
else mas &= ~(1 << bit); //Clear bit
}
void loop() {
testPin(1, 0);
testPin(2, 1);
testPin(0, 2);
//From here on you can compare like so:
if (mas == case1) {
//Do something
} else {
//Do something else
}
}
You can't compare a whole array at once like that. There is a memcmp function you can look up that can do it. But I think this code could be simplified a lot otherwise and may not need that in the end.
When you refer to arrays in your code like here:
Serial.println(mas[]);
You must always tell the compiler which member of the array you want to refer to. You must always have something inside the . The only place where an empty is OK is when you first create the array IF AND ONLY IF you also supply a list of initial values in { and } so the compiler can count and figure out the number.
BTW: this comment is wrong.
int mas[2]; //mas={..., ..., ...}
If mas only has 2 members then it would only be {... , ... } and they would be numbered 0 and 1. I think you wanted a 3 in there so you would have mas[0], mas[1], and mas[2].
char array[] = "This is my array.";
Serial.println(array[]);
It will error I'm sure. Don't have Arduino handy to try. But I'm betting it errors. The syntax there is to pass a pointer to the first character. And that's why you have to have the null to mark the end, because the print function doesn't know how long the string is that's being passed.
So normally you would write:
char array[] = "This is my array.";
Serial.println(array);