简体   繁体   English

通过USB端口进行简单的串行通信

[英]Simple serial communication via USB ports

i am new to C#. 我是C#的新手。 I want to write a simple console app or function that would open known usb port, for example "COM6" and send pre-configured data through it. 我想编写一个简单的控制台应用程序或函数来打开已知的USB端口,例如“COM6”并通过它发送预配置的数据。 Idealy it would work like a somekind od a function sendcommand(command); 理想情况下,它会像函数sendcommand(命令)一样工作; and int value would be sent. 和int值将被发送。 Can someone help me and tell me where to start? 有人可以帮我,告诉我从哪里开始?

Stackoverflow forum is rather for hints on actual programming issues. Stackoverflow论坛更多的是关于实际编程问题的提示。

"How to get started" is thus off topic. 因此,“如何开始”是一个主题。 But as a newbie bonus, here you are: 但作为一个新手奖金,你在这里:

  • In .net ( c# ) you start reading about System.IO.Ports.SerialPort 在.net(c#)中,您开始阅读有关System.IO.Ports.SerialPort的内容
  • In Arduino c++ you start reading about Serial. 在Arduino c ++中,您开始阅读有关Serial的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM