SerialPort.BaudRate : SerialPort « System.IO.Ports « C# / C Sharp by API






SerialPort.BaudRate

  


using System;
using System.IO.Ports;

static class MainClass
{
    static void Main(string[] args)
    {
        using (SerialPort port = new SerialPort("COM1"))
        {
            // Set the properties.
            port.BaudRate = 9600;
            port.Parity = Parity.None;
            port.ReadTimeout = 10;
            port.StopBits = StopBits.One;

            // Write a message into the port.
            port.Open();
            port.Write("Hello world!");

            Console.WriteLine("Wrote to the port.");
        }
    }
}

   
    
  








Related examples in the same category

1.new SerialPort("COM1", 19200))
2.SerialPort.BaseStream
3.SerialPort.Parity
4.SerialPort.Read
5.SerialPort.ReadTimeout
6.SerialPort.StopBits
7.SerialPort.Write