从串口读取数据 [英] read data from serial port

查看:149
本文介绍了从串口读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正在开发手持系统。

解决方案

首先查看SerialPort类: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v = VS .110).aspx [ ^ ] - 该链接包含一个示例,但它不使用事件。这样做: http:// msdn。 microsoft.com/en-us/library/system.io.ports.serialport.datareceived(v=vs.110).aspx [ ^ ] - 在大多数情况下是更好的方法

am developing hand held system.

解决方案

Start by looking at the SerialPort Class: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport(v=vs.110).aspx[^] - the link includes an example, but it doesn't use events. This does: http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.datareceived(v=vs.110).aspx[^] - and is a better approach in most cases.


这篇关于从串口读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆