public static void ThreadWriteProcess() { COMPort cp = new COMPort("COM1"); cp.Open(); for (int i = 0; i < 100; i++) { Thread.Sleep(100); cp.setBuffer(System.Text.Encoding.ASCII.GetBytes("hello world")); cp.Write(); } cp.Close(); }
public static void ThreadWriteProcess() { COMPort cp = new COMPort("COM1"); cp.Open(); for (int i = 0; i < 100; i++) { Thread.Sleep(100); cp.setBuffer(System.Text.Encoding.ASCII.GetBytes("hello world")); cp.Write(); } cp.Close(); }