问题描述
我是Python新手。对通过串行端口(或usb,并行)控制(微控制器)非常感兴趣。我想我会从学习pyserial开始。我在网上看到了一些例子和sourceforge示例。
我正在使用windows xp。
想知道是否任何人都有使用pyserial的任何非常简单的示例。如果有人能以一种非常简单的方式帮助解释每一行代码?
pyserial是最简单的方法吗?
(另外,是否有任何书籍可以解释如何使用访问PC端口向微控制器发送数据?)
真诚地感谢任何信息,任何人都可以提供的建议。
在此先感谢,
Tony
我使用Python为Motorola 68HC11编写了一个完整的IDE。它有一个用于与串口通信的Tkinter UI。那时候,我使用Win32软件包来获取串口,但现在可能会使用pyserial。如果您有兴趣,我可以提供代码。
Hi,
I am new to Python. Very interested in controlling things (microcontrollers) via the serial port (or usb, parallel). I thought I would start by learning about pyserial. I have seen some examples here and there on the web and the sourceforge examples.
I''m using windows xp.
Wondering if anyone has any very simple examples of using pyserial. And if anyone can help explain each line of code in a very simple way?
Would pyserial be the easiest way to go?
(Also, are there any books out there that explain how to use access PC ports to send data to microcontrollers?)
Sincerely appreciate any info, advice anyone can offer.
Thanks in advance,
Tony
I wrote an entire IDE for the Motorola 68HC11 using Python. It has a Tkinter UI for talking to the serial port. Back then, I used the Win32 package to get serial port access, but would probably use pyserial, now. I can make the code available, if you''re interested.
这篇关于Pyserial vs Win32 CreateFile()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!