How can I send simple Escape-Sequences to a serial-port (COM4 in my case) with C# in Windows XP and Windows 7?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use a form the easy way is to drop the SerialPort control on to it and set PortName to COM4.
If you don’t use a form you can declare the control from System.IO.Ports.
Then set baud rate, parity etc. to match the port on the other end.
Here is a complete example on how to use it:
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx