user4430: I'm trying to detect baud rate of Arduino Mega2560 by using C#. My code is below:
SerialPort SP=new SerialPort();
SP.BaudRate = 115200;

BaudRate is specified as a constant like this, but I would like to automatically detect it.
For instance, if Arduino code includes Serial.begin(xxxx), program should declare SP.BaudRate = xxxx.
How can I do it?

user4385: I'm not a C# programmer but this StackOverflow answer might be what you're looking for.

4430: <p>I'm trying to detect baud rate of Arduino Mega2560 by using C#. My code is below:</p>

<pre><code>SerialPort SP=new SerialPort();
SP.BaudRate = 115200;
</code></pre>

<p>BaudRate is specified as a constant like this, but I would like to automatically detect it.</p>

<p>For instance, if Arduino code includes Serial.begin(xxxx), program should declare SP.BaudRate = xxxx.</p>

<p>How can I do it?</p>
 4385: <p>I'm not a C# programmer but <a href="https://stackoverflow.com/a/16590749/4138037">this</a> StackOverflow answer might be what you're looking for.</p>
