Go Down

Topic: Help me!! I want receive code for RS232 (Read 420 times) previous topic - next topic

talobtobtab

Nov 24, 2008, 03:45 pm Last Edit: Nov 24, 2008, 03:49 pm by talobtobtab Reason: 1
I have sent code is:


string port = "COM1";
           int baud = 9600;
           InitializeComPort(port, baud);
           myPort.WriteLine(ID);
           myPort.WriteLine(name);
           myPort.WriteLine(Convert.ToString(chan));
           myPort.WriteLine(ba);
           myPort.WriteLine(maes);
           myPort.WriteLine(Convert.ToString(num));
           myPort.WriteLine(type);
           MessageBox.Show(Convert.ToString(myPort.IsOpen));
           myPort.Close();



and function:


SerialPort myPort;
      ¬†private void InitializeComPort(string port, int baud)
      ¬†{
           myPort = new SerialPort(port, baud);
           // ComPort.PortName = port;
           // ComPort.BaudRate = baud;
           myPort.Parity = Parity.None;
           myPort.StopBits = StopBits.One;
           myPort.DataBits = 8;
           myPort.Handshake = Handshake.None;
           myPort.Open();
      ¬†}


I want code for receive code for this code on pop-168 arduino

Go Up