c++ - 从 Windows 上的 C++ 或 Python 的串口读取

标签 c++ python windows serial-port

我需要使用 Python 或 C++ 从 Windows 读取串口。我应该使用什么 API/库?你能指导我看教程吗?谢谢!

最佳答案

在 python 中你有优秀的包 pyserial这应该是跨平台的(我只在 GNU/Linux 环境中使用过)。

快来看看吧,使用起来非常简单,但是非常强大!

当然examples提供!

顺便说一句,如果有用的话here你可以找到我的一个项目,它使用 pyserial 作为扩展示例。

关于c++ - 从 Windows 上的 C++ 或 Python 的串口读取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2354905/

相关文章:

c++ - 在数据库中插入空行而不是传递值

c++ - Unicode字符串的跨平台迭代(使用ICU计算字形)

python - Pandas - 将直方图桶分配给每一行

python - 我可以同时为 Windows 和 Linux 平台编写 Python Web 应用程序吗?

python - 如何使用 ElementTree 在 python 中复制 xml 树?

c++ - C/C++ vector 到 Numpy 数组的快速转换

c++ - 结构 vector

python - 难道windows的setsockopt坏了?

windows - msys2 找不到 mingw64

c++ - 带有 Boost 的 CMake 找不到静态库