从串行端口读取和发送数据

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#.

这篇关于从串行端口读取和发送数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)