没有pyserial的Python串行 [英] Python serial without pyserial

查看:62
本文介绍了没有pyserial的Python串行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Pyserial 时遇到了问题(这不是第一个:PySerial 写入错误(波特率)敏感))

I have been having problems with Pyserial (this is not the first: PySerial write errors (baudrate sensitive))

这个问题的公认答案:

pySerial 在 Python 解释器中运行良好,但不是独立的

引用:或者,您可能只想打开并直接写入设备而不是使用此库串行""

quote: "Alternatively, instead of using this library "serial" you might want to just open and write directly to the device"

似乎表明可以在不使用 pyserial 的情况下写入/读取设备,有人有这样的例子吗?我可以把它当作一个文件吗?

seems to suggest it is possible to write to/read from a device without using pyserial, does anyone have an example of this? can I treat it like a file?

任何链接或信息将不胜感激

Any links or info would be appreciated

谢谢!

推荐答案

环顾四周我发现了这个例子.

来自网站:

arduinoserial.py 是 Tod E. Kurt 的 arduino-serial.c 程序的 Python 端口,用于通过串行端口与 Arduino 微控制器板进行通信.它只使用标准 Python 模块(特别是 termios 和 fcntl),不需要任何特殊的串行通信模块.

arduinoserial.py is a Python port of Tod E. Kurt's arduino-serial.c program for communicating with an Arduino microcontroller board over a serial port. It only uses standard Python modules (notably termios and fcntl) and does not require any special serial communications modules.

就像 Tod 的程序一样,您可以从命令行使用它.

Like Tod's program, you can use it from the command line.

这篇关于没有pyserial的Python串行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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