Thanks
byte[] c = new byte[] {
0x14,
0x20,
0x30,
0x12,
0x37,
0x33,
0x04,
0x03
};
private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e)
{
string strRE = serialPort1.ReadExisting();
this.BeginInvoke(new EventHandler(delegate
{
SetTheText(strRE);
}));
Application.DoEvents();
}
private void SetTheText(string strText)
{
txtReceive.Text += strText;
serialPort1.Write(c, 0, c.Length);
}

New Topic/Question
Reply




MultiQuote





|