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#.
这篇关于从串行端口读取和发送数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从串行端口读取和发送数据
基础教程推荐
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- WPF 模态进度窗口 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
