Esempio n. 1
0
 private static void Main(string[] args)
 {
     SerialPortFixer.Execute("COM1");
     using (SerialPort port = new SerialPort("COM1"))
     {
         port.Write("test");
     }
 }
Esempio n. 2
0
 private static SerialPort CreateNewSerialPort(ArduinoPortConnectionInfo connectionInfo)
 {
     //Address issues in underlying stream opening: http://zachsaw.blogspot.com/2010/07/net-serialport-woes.html
     SerialPortFixer.Execute(connectionInfo.PortName);
     return(new SerialPort(connectionInfo.PortName, connectionInfo.BaudRate));
 }