title: Arduino code compile error: "lvalue required as left operand of assignment"
body: <p>I am getting this error when I attempt to compile my code:</p>
  
  <blockquote>
    <p>lvalue required as left operand of assignment.</p>
  </blockquote>
  
  <p>The code is reading in buttons though an analogue port. This is where the error is (in void(loop)):</p>
  
  <pre><code>while (count &lt; 5){
      buttonPushed(analogPin) = tmp;
  
          for (j = 0; j &lt; 5; j++) {
                  while (tmp == 0) { tmp = buttonPushed(analogPin); }                 //something wrong with the first half of this line!
  
          if(sequence[j] == tmp){
                          count ++;
                  }
  
          else { 
              lcd.setCursor(0, 1); lcd.print("Wrong! Next round:");                       delay(1000);
                          goto breakLoops;
                  }
  
          }
  }
  
  breakLoops:
  elapsedTime = millis() - startTime;
  </code></pre>
  
  <p>At the very top I have: <code>int tmp;</code></p>