基本信息
源码名称:摄像头上位机(图片传输上位机)
源码大小:0.33M
文件格式:.zip
开发语言:C#
更新时间:2019-04-10
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
public partial class Form1 : Form
{
int fps = 0;
int ReadDataBytes = 0;
Byte[] readBytes;
Image jpg_image;
Queue<Byte []> data_list = new Queue<Byte []>(); //列队用于缓冲串口数据
public Form1()
{
InitializeComponent();
timer1.Start();
timer2.Start();
}
private void Form1_Load(object sender, EventArgs e)
{
string[] portList = System.IO.Ports.SerialPort.GetPortNames(); //搜索可用串口
for (int i = 0; i < portList.Length; i )
{
string name = portList[i];
comboBox1.Items.Add(name);
}
serialPort1.DataReceived = serialPort1_DataReceived;
Thread thread1 = new Thread(new ThreadStart(Data_Process)); //建立一个线程用于处理串口接收到的数据
thread1.IsBackground = true;
thread1.Start();
}