[visionegg] Re: LPT: trigger_in only on change from 1 to 0
- From: Andrew Straw <andrew.straw@xxxxxxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Sun, 4 May 2003 06:29:50 -0600
Hi Christoph,
Sorry -- disregard my previous answer. I have realized the source of
your troubles.
the command:
input_value = raw_lpt_module.inp(0x379) & 0x20 # pin nr 12
if input_value == 1:
do something
The "&" operator is a binary, bit-wise operator. So, don't test "if
input_value == 1:" test "if input_value == 0x20:" or just "if
input_value:"
That should do the trick!
Cheers!
Andrew
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- References:
- [visionegg] Re: LPT: trigger_in only on change from 1 to 0
- From: Andrew Straw
Other related posts:
- » [visionegg] LPT: trigger_in only on change from 1 to 0
- » [visionegg] Re: LPT: trigger_in only on change from 1 to 0
- » [visionegg] Re: LPT: trigger_in only on change from 1 to 0
the command:
input_value = raw_lpt_module.inp(0x379) & 0x20 # pin nr 12
if input_value == 1:
do something
- [visionegg] Re: LPT: trigger_in only on change from 1 to 0
- From: Andrew Straw