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

The accepted answer for this question:

pySerial works fine in Python interpreter, but not standalone

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

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

Thanks!

有帮助吗?

解决方案

Looking around I found this example.

From the site:

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.

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top