开发者

Reading from and Sending data to Serial port

开发者 https://www.devze.com 2023-02-06 16:35 出处:网络
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 开发者

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.

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.


The .NET framework even has a proper SerialPort class, which will be just fine for your application.


There's a detailed guide here here which covers good practise in using Serial Ports in C#.

0

精彩评论

暂无评论...
验证码 换一张
取 消