c# - Auto detecting Baud Rate of Arduino -


I am trying to find the baud rate of Arduino Mega2560 using C #. My code is below:

  SerialPort SP = new SerialPort (); SP.BaudRate = 115200;  

BaudRate is specified as static in this way, but I would like to recognize it automatically. For example, if the Arduino code contains the serial.bzin (xxxx), the program should declare SP.BaudRate = xxxx.

How can I do this?


Comments