I've never worked with hardware at this low of a level, so I hope you'll be gentle. I've been successful in getting psychopy / pyparallel to read and set data (I've been messing around lighting up led's with a breadboard), but I can't influence that data from the switches (or from the breadboard).
For example, if I set pin 2 high from a script (set it to '1'), it doesn't matter if there is a closed electrical circuit or not, readPin() always returns 1. I was under the impression that it would be set to 0 if there was no electricity running to it.
If I initialize pin 2 to high (1), and the circuit is closed (the button is depressed), readPin(2) returns 1. This is what I expected.
Now if I break the circuit (the button is not pressed), readPin(2) still returns 1, when I expected it to return 0.
On Sat, Nov 21, 2015 at 9:58 PM, Daniel Riggs <daniel...@gmail.com> wrote:If I initialize pin 2 to high (1), and the circuit is closed (the button is depressed), readPin(2) returns 1. This is what I expected.Why would you expect that? As soon as you read from the pin, it does not produce an output voltage anymore, and should effectively have ground potential. Or maybe I'm just confused here :)
--
You received this message because you are subscribed to a topic in the Google Groups "psychopy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/psychopy-users/L-vZDiTP7-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/CAGm-8jP%2BCe%2BYQHweXRFbEmrndjdqLxnRJHroxh-va4tEQqXdVw%40mail.gmail.com.
I'm confused about the 'read mode': is that referring to the different modes available on the parallel port (hence my comment above about trying to use EPP mode, since it allows for data input and output)?
I think I see what you mean about connecting one pin to another: maybe take a signal from a 'high' pin 13 (one of the status pins), and wire it to a data input pin?
I'm not sure I follow with the pin no longer having voltage after it's been read. At least in my breadboarding, the led remains lit for however long the pin is set to 1.
--
You received this message because you are subscribed to a topic in the Google Groups "psychopy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/psychopy-users/L-vZDiTP7-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to psychopy-user...@googlegroups.com.
To post to this group, send email to psychop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/psychopy-users/fd4039c5-10bc-41b8-bbb1-eb56e4754c10%40googlegroups.com.
I might be an idiot: I had put resistors between the leds and the pins to not burn them out. When I get home later today I'll try connecting it directly to ground and see if the value of the pin changes.
2015-11-23 10:42 GMT-05:00 Daniel Riggs:
Hello Richard,No real news. I contacted the guy who had built a similar box, and he says he's not sure why it's not working for me. He said that "the data pins should have a 5V signal, and if you connect one of them to one of the ground pins, that should drop that signal to 0V and change the pins status", which is what I was hoping for, but no dice. So does this mean that ground is not lowering the voltage enough?Testing on the breadboard, this would mean that an led between a data pin and a ground pin should not stay lit, right? But in my case it does. It actually only lights when connected to a high data pin and to ground, and remains lit until I set the pin to low from the computer.I'm kind of at the limit of my understanding, so other than going out there and learning as much as I can about how electronics work (any resources would be appreciated), I'm not too sure what to do.I suppose my last line of inquiry is determining if my pins are set to input or output, and how to change that. That was my question concerning the different 'modes' of the parallel port, (SPP, ECP, EPP, etc.) which seem to affect whether certain pins can be input or output. Since my parallel port card did not come with the motherboard, it's not something I can change within the BIOS, and my understanding is that the mode is set depending on the device connected to it. The device can send it data telling it what mode to use. Looking at the pyparallel source it had a method to set the mode, but calling it has made no difference yet.Dan
I certainly don't want to waste too much more of your time, and thank you again for your help.
On Monday, November 23, 2015 at 7:11:41 AM UTC-5, Richard Höchenberger wrote:Hey Dan,
any news on this one? Did you make any progress? :)
Cheers,
Richard
--
You received this message because you are subscribed to a topic in the Google Groups "psychopy-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/psychopy-users/L-vZDiTP7-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to psychopy-users+unsubscribe@googlegroups.com.
To post to this group, send email to psychopy-users@googlegroups.com.