title: Arduino Serial Port, data don't arrive
body: <p>I have a problem with my Arduino (Yun)
  Basically I would like the board communicate its data with a C# program
  Loading this on Arduino:</p>
  
  <pre><code>int Loop=0;
  void setup() {
      Serial.begin(9600);
  }
  void loop() {
      Serial.println(" Data loop = " + String(Loop));
      Loop++;
      delay(500);
  }
  </code></pre>
  
  <p>And this is the C# code:</p>
  
  <pre><code>SerialPort ArduinoSerial = new SerialPort("COM7", 9600);
  ArduinoSerial.Open();
  while (true)
  {
      string data= ArduinoSerial.ReadLine();
      Console.WriteLine(a);
  }
  </code></pre>
  
  <p>Every time I start the program will come something unpredictable
  Sometimes there is nothing written, sometimes this:
  5
  6
  7
  10
  _
  But why? Sometimes data is lost, sometimes do not "arrive" anything
  Trying with an emulator of serial monitor (puTTY) data arrives
  Then why? Where am I wrong?</p>