我如何发送信号"a"?到笔记本电脑的串口 [英] how can i send signal "a" to serial port of laptop
本文介绍了我如何发送信号"a"?到笔记本电脑的串口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的朋友,
我可以使用C#代码将信号发送到笔记本电脑的串行端口吗?
如果可以,该怎么办?
请提供代码帮助.
关于bishnu
Dear friends,
Can I send signal to serial port of my laptop using C# code.
If yes how can I do that?
Please help with the code.
With regards bishnu
推荐答案
请参阅,
使用C#和Whidbey进行的串行通信 [
Refer this,
Serial Communication using C# and Whidbey[^]
您可以使用SerialPort类 [
You can use the SerialPort class [^]to communictae with the serial port.
Hope this helps
您可以
试试这个
包括这个名字空间1st
使用System.IO.Ports;
然后创建一个像这样的串行对象
SerialPort端口=新的SerialPort("COM1");
即使您还需要知道系统的波特率通常为9600
写入串口使用代码
port.Write("A");
希望这对您有帮助...
ya u can
try this
include this name space 1st
using System.IO.Ports;
then create an serial object like this
SerialPort port = new SerialPort("COM1");
even u need to know the baurd rate of the system usually it will be 9600
to write into serial port use code
port.Write("A");
hope this will help u...
这篇关于我如何发送信号"a"?到笔记本电脑的串口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文