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

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

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

本文标题为:从串行端口读取和发送数据

基础教程推荐