Multiple if statement conditions
digitalWrite (ledPin1 = HIGH); should be digitalWrite (ledPin1, HIGH);

PS if ( (x = LOW) &amp;&amp; (y = LOW) &amp;&amp; (z = LOW)) should be if ( (x == LOW) &amp;&amp; (y == LOW) &amp;&amp; (z == LOW)). = is for assignment, == is for comparison.