System.IO.Ports.SerialPort com = new System.IO.Ports.SerialPort( " com3 " );com.Open();com.WriteLine( " P " );com.Close(); // 是不是很简单