读取和发送数据到串口 [英] 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#.
这篇关于读取和发送数据到串口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!