如何使用C从Windows中的COM端口读取? [英] How can I read from COM port in Windows using C?

查看:144
本文介绍了如何使用C从Windows中的COM端口读取?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我想要实现的是,在COM3上使用Arduino在Windows中使用C程序来识别按钮是否被按下。为此,据我所知,我需要了解从COM端口读取。我能够找到的大多数教程都是特定于UNIX的,到目前为止我还不足以真正理解它们。那么,这里有没有人有这样的经历?

Basically, what I want to achieve is, using Arduino on COM3 a C program in windows to recognize whether a button has been pressed or no. For that, as far as I understand, I need to understand reading from COM port. Most of the tutorials I have been able to find are UNIX specific and so far I don't feel competent enough to really understand them. So, is there anyone here who has any experience with stuff like this?

推荐答案

查看文档: MSDN上的通信资源 [ ^ ]。

使用通信资源 [ ^ ]提供代码示例。
Check out the documentation: "Communications Resources" at MSDN[^].
"Using Communications Resources"[^] provides code samples.


这篇关于如何使用C从Windows中的COM端口读取?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆