Home Forums Gamescan Chat42 About
* Login   * Register * FAQ    * Search
It is currently Tue 07-29-2025 12:00AM

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Parallel/Gameport I/O in C++
PostPosted: Tue 09-12-2006 9:42PM 
Offline
Sergeant
User avatar

Joined: Sun 08-13-2006 11:43PM
Posts: 28
Location: TJ S 866

Source: RC I
Hey all you CompSci guys out there, I need a bit of help. I've got a PC that's going to be sitting by my door running Win2k to control relays that open and close the door. I'm trying to read input from my parallel port hooked to a few limit switches into a C++ program to tell the relays when to turn on and off.

Correction, Tried. I can't get any decisive input data from grounding the shown input only pins, and I don't think I really understand how statuses should be pulled from pins. As far as I can tell, the input function just gets passed a port, and that port returns a byte, and somehow I have to pull some data out of there....?

I've gotten all of my output to work great using one of these: http://www.electronickits.com/kit/complete/elec/ck1601.htm I'm just having input woes now...

My first question(s): Is this possible with the board I'm using? If not, could I use a gameport to read switch values instead?

My second question(s): Where am I going wrong here? Is there a better way to go about reading inputs from switches into a program?

I have a fair knowledge of C++ and a pretty damn good understanding of computers, so, don't feel like you have to talk totally dumb to me (although, I am a freshman, so I expect it anyway, heh).

Thanks in advance for the help!

Ron


Top
 Profile  
    
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group