title: Arduino RGB LED lvalue problem in string variable reading from Serial Monitor
body: <p>I'm working with an RGB Led in Arduino Uno but when I try to compile this message comes for this string 'myColor = Serial.readString();':
  In function 'void loop()':
  21:29: error: lvalue required as left operand of assignment
  exit status 1</p>
  <p>The attached screen dump provides the following code:</p>
  <pre><code> 1  int red=9;
   2  int green=10;
   3  int blue=11;
   4  String msg=&quot;What color LED?&quot;;
   5  String myColor;
   6
   7  void setup()
   8  {
   9    pinMode(red, OUTPUT);
  10    pinMode(green, OUTPUT);
  11    pinMode(blue, OUTPUT);
  12    Serial.begin(9600);
  13  }
  14
  15  void loop()
  16  {
  17    Serial.println(msg);
  18    while(Serial.available()=0) {
  19    }
  20    myColor = Serial.readString();
  21    if (myColor==&quot;red&quot;){
  22      digitalWrite(red,HIGH);
  </code></pre>
  <p>and the resulting compiler error is:</p>
  <pre><code>In function 'void loop()':
  20:29: error: lvalue required as left operand of assignment
   exit status 1
  </code></pre>
  <p><a href="https://i.stack.imgur.com/pTMJD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pTMJD.jpg" alt="enter image description here" /></a></p>