R
Rainer Borchmann
Hi,
please can anyone tell me what is wrong with this code ?
i have an oszilloskop on the COM1 ,and nothing comes out of it.
Rainer
VS2005
..............................
private void button1_Click(object sender, EventArgs e)
{
// Instantiate the communications // port with some basic settings
SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8,
StopBits.One);
// Open the port for communications
port.Open();
// Write a string
port.Write("Hello World");
//// Write a set of bytes
port.Write(new byte[] { 0x0A, 0xE2, 0xFF }, 0, 3);
// Schliessen COM1
port.Close();
}
......................................
Thank you
Rainer
please can anyone tell me what is wrong with this code ?
i have an oszilloskop on the COM1 ,and nothing comes out of it.
Rainer
VS2005
..............................
private void button1_Click(object sender, EventArgs e)
{
// Instantiate the communications // port with some basic settings
SerialPort port = new SerialPort("COM1", 9600, Parity.None, 8,
StopBits.One);
// Open the port for communications
port.Open();
// Write a string
port.Write("Hello World");
//// Write a set of bytes
port.Write(new byte[] { 0x0A, 0xE2, 0xFF }, 0, 3);
// Schliessen COM1
port.Close();
}
......................................
Thank you
Rainer