C#窜口通信serialPort1.ReadLine()读取不到数据
代码简单到死问题郁闷到死privatevoidbutton1_Click(objectsender,EventArgse){serialPort1.PortName="C...
代码简单到死
问题郁闷到死
private void button1_Click(object sender, EventArgs e)
{
serialPort1.PortName = "COM1";
serialPort1.BaudRate = 9600;
serialPort1.Open();
serialPort1.WriteLine("asb");
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(serialPort1.ReadLine());
serialPort1.Close();
} 展开
问题郁闷到死
private void button1_Click(object sender, EventArgs e)
{
serialPort1.PortName = "COM1";
serialPort1.BaudRate = 9600;
serialPort1.Open();
serialPort1.WriteLine("asb");
}
private void button2_Click(object sender, EventArgs e)
{
MessageBox.Show(serialPort1.ReadLine());
serialPort1.Close();
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询