Reading from and Sending data to Serial port(从串行端口读取和发送数据)
问题描述
我正在尝试进行串行端口通信以发送和接收数据.场景如下:
I'm trying to do a serial port communication to send and receive data. Here is the scenerio:
我连接到一个串行端口并启动我的设备.当它倒计时做某事时,我应该暂停它并向它发送一些命令来工作.一切正常,然后再次开始继续.
I connect to a serial port and start my device. When it's counting down to do something, I should pause it and send it some command to work. It does all work and then again the starting continues.
现在我通过互联网搜索,c# 适合我.你可以在做这个的时候给我一些建议吗?我该如何开始,我需要使用哪些方法?谢谢.
Now i searched through the internet and c# fits me. Can you suggest anything to me while doing this? How can i start and which methods do i need to use ? Thank you.
推荐答案
这里有详细指南 这里介绍了在 C# 中使用串行端口的良好做法.
There's a detailed guide here here which covers good practise in using Serial Ports in C#.
这篇关于从串行端口读取和发送数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从串行端口读取和发送数据


基础教程推荐
- 全局 ASAX - 获取服务器名称 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- JSON.NET 中基于属性的类型解析 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01