将字节发送到并行端口 [英] sending bytes to parallel port

查看:72
本文介绍了将字节发送到并行端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。


我一直试图在

freebsd下向我的并行端口发送一个8字节的字符串。目的是控制继电器板。

电路板只响应来自端口的输出字节。例如。

00000001将引脚1设置为高电平并轻触继电器打开。

todate我试过这个只用open /(/ dev / ppi0和numpy)

字节数组,但我似乎无法让它工作。

i知道并行端口工作,我知道继电器板工作(测试

它有自己的窗户ultility)所以这只是我糟糕的编程

阻止我成功。

hello people.

i''ve been trying to send an 8 byte string to my parallel port under
freebsd. the purpose is it to control a relay board.
the board simply responds to the output byte coming from the port. eg.
00000001 will set pin 1 high and flick the relay open.
todate i''ve attempted this with merely open() on /dev/ppi0 and numpy for
the byte array, but i just can''t seem to get it working.
i know the parallel port works and i know the relay board works (tested
it with it''s own windows ultility) so it''s just my crappy programming
keeping me from success.

推荐答案

2006-07-28,Timothy Smith< ti ***** @ open-networks.netwrote:
On 2006-07-28, Timothy Smith <ti*****@open-networks.netwrote:

i'我一直试图在freebsd下向我的并行端口发送一个8字节的字符串

。目的是控制继电器板。

板只响应来自端口的输出字节。

例如。 00000001将引脚1设置为高电平并轻触继电器打开。

todate我试过这个只用open /(/ dev / ppi0)和

numpy为字节数组,但我似乎无法得到它

工作。我知道并行端口工作,我知道继电器

板工作(用它自己的窗口测试它测试它)所以它是

只是我糟糕的编程阻止我成功。
i''ve been trying to send an 8 byte string to my parallel port
under freebsd. the purpose is it to control a relay board. the
board simply responds to the output byte coming from the port.
eg. 00000001 will set pin 1 high and flick the relay open.
todate i''ve attempted this with merely open() on /dev/ppi0 and
numpy for the byte array, but i just can''t seem to get it
working. i know the parallel port works and i know the relay
board works (tested it with it''s own windows ultility) so it''s
just my crappy programming keeping me from success.



我猜这里有隐含的求助请求

。这将是一个良好的开端:

http://www.google.com/search?q=python+parallel+port

我特别推荐看看pyparallel

模块在这里找到:

http:// pyserial .sourceforge.net /

我没有使用过pyparallel,但是根据我的经验来看,这是基于我的经验。还有其他的工作,我敢打赌
美元给甜甜圈这是你最好的选择。


-

Grant Edwards grante哇!它是如此的显眼!!



visi.com

I''m guessing there''s an implied request for help there
somewhere. This would be a good start:

http://www.google.com/search?q=python+parallel+port

I''d particularly recommend taking a look at the pyparallel
module found here:

http://pyserial.sourceforge.net/

I''ve not used pyparallel, but based on my experience with
pyserial and some of Chris Liechti''s other work, I''d bet
dollars to doughnuts it''s your best option.

--
Grant Edwards grante Yow! It''s so OBVIOUS!!
at
visi.com


2006-07-29, Grant Edwards< gr **** @ visi.comwrote:
On 2006-07-29, Grant Edwards <gr****@visi.comwrote:

我特别推荐看一下pyparallel

模块在这里找到:

http://pyserial.sourceforge.net/



哎呀,实际上并没有从该页面到pyparallel的链接

(我发誓曾经这样)。这是pyparallel页面:

http:// pyserial.sourceforge.net/pyparallel.html


-

Grant Edwards grante哇!在美国,我们在

...我们什么时候才能获得失业?

Oops, there isn''t actually a link to pyparallel from that page
(I swear there used to be). Here''s the pyparallel page:

http://pyserial.sourceforge.net/pyparallel.html

--
Grant Edwards grante Yow! Here we are in
at America... when do we
visi.com collect unemployment?


Grant Edwards写道:
Grant Edwards wrote:

2006-07-28,Timothy Smith< ti ***** @ open-networks.netwrote:

>我一直在尝试向freebsd下的并行端口发送一个8字节的字符串
。目的是控制继电器板。
板只响应来自端口的输出字节。
例如。 00000001将引脚1设置为高电平并轻触继电器打开。
todate我试过这个只用open /(/ dev / ppi0)和
numpy为字节数组,但我只是可以''似乎得到它
工作。我知道并行端口工作,我知道继电器板工作(用它自己的窗口测试它测试它)所以它只是我糟糕的编程让我无法成功。
>i''ve been trying to send an 8 byte string to my parallel port
under freebsd. the purpose is it to control a relay board. the
board simply responds to the output byte coming from the port.
eg. 00000001 will set pin 1 high and flick the relay open.
todate i''ve attempted this with merely open() on /dev/ppi0 and
numpy for the byte array, but i just can''t seem to get it
working. i know the parallel port works and i know the relay
board works (tested it with it''s own windows ultility) so it''s
just my crappy programming keeping me from success.



我猜这里有隐含的求助请求

。这将是一个良好的开端:

http://www.google.com/search?q=python+parallel+port

我特别推荐看看pyparallel

模块在这里找到:

http:// pyserial .sourceforge.net /

我没有使用过pyparallel,但是根据我的经验来看,这是基于我的经验。还有其他的工作,我敢打赌
美元给甜甜圈这是你最好的选择。


I''m guessing there''s an implied request for help there
somewhere. This would be a good start:

http://www.google.com/search?q=python+parallel+port

I''d particularly recommend taking a look at the pyparallel
module found here:

http://pyserial.sourceforge.net/

I''ve not used pyparallel, but based on my experience with
pyserial and some of Chris Liechti''s other work, I''d bet
dollars to doughnuts it''s your best option.



yes ,我确实尝试过pyparallel但是它不会安装在freebsd上,

setup.py错误。


和是的我已经做了很多的谷歌搜索,我从未预料到这将是困难的。我以前做过串口工作。从不平行但是。

yes, i did try pyparallel however it will not install on freebsd,
setup.py errors.

and yes i''ve done quite a bit of googling, i never expected it to be
this difficult. i''ve done work with serial ports before. never parallel but.


这篇关于将字节发送到并行端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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