title: How to read a string value with a delimiter on Arduino?
body: <p>I have to manage servos from a computer. </p>
  
  <p>So I have to send manage messages from computer to Arduino. I need manage the number of servo and the corner. I'm thinking of sendin something like this : "1;130" (first servo and corner 130, delimeter ";"). </p>
  
  <p>Are there any better methods to accomplish this? </p>
  
  <p>Here is my this code :</p>
  
  <pre class="lang-cpp prettyprint-override"><code>String foo = "";
  void setup(){
     Serial.begin(9600);
  }
  
  void loop(){
     readSignalFromComp();
  }
  
  void readSignalFromComp() {
    if (Serial.available() &gt; 0)
        foo = '';
    while (Serial.available() &gt; 0){
       foo += Serial.read(); 
    }
    if (!foo.equals(""))
      Serial.print(foo);
  }
  </code></pre>
  
  <p>This doesn't work. What's the problem?</p>