title: Arduino switch with chars
body: <p>I have a switch statement, but It seems that don't recognize the character C as always print default</p>
  
  <pre><code>void setup() {
     Serial.begin(9600);
     Serial.println("Serial conection started, waiting for instructions...");
  }
      String serialReceived;
      char commandChar[1];
  
      void loop() {
  
        if(Serial.available() &gt; 0) {
  
              serialReceived = Serial.readStringUntil('\n');
              serialReceived.substring(0,1).toCharArray(commandChar, 1);
  
  
              switch (commandChar[0]) {
               case 'C':
                   Serial.print("Arduino Received C");
                   break;
                  default:
                   Serial.print("default");
              }
  
         }
      }
  </code></pre>