PC与无线数传模块串口通信

时间:2021-10-28 14:22:35
【文件属性】:

文件名称:PC与无线数传模块串口通信

文件大小:722KB

文件格式:ZIP

更新时间:2021-10-28 14:22:35

无线数传 无线数传串口

byte[] data1 = new byte[2]; object data = axMSComm1.Input; data1 = (byte[])data; ; // char[] data1 = data.ToCharArray();//字符串转字符数组 short data2 = (short)data1[0];//字符转数值 short data3 = (short)data1[1];//字符转数值 double dd = data2 * 16.0*16 + data3; q = dd / 10.0;//十进制 textBox5.Text = q.ToString(); short q2 = (short)(q*2); Graphics pic = this.pictureBox1.CreateGraphics(); pictureBox1.BackColor = Color.White; if (x > 1) pic.DrawLine(Pens.Black, x, pictureBox1.Height - qtemp , x + 1, pictureBox1.Height - q2 ); qtemp = q2; x++;


网友评论