Thread: Parallel Port! Detect incoming current, posible?

  1. #1
    Registered User
    Join Date
    Jan 2005

    Parallel Port! Detect incoming current, posible?

    I have little knowledge about parallel port programming on Linux. I wan't to know if its possible to like 'listen' if the current is incoming into data pin? What I need is forexample I have two wires, one from Data pin 1 and other from ground, if I put them together some function will return for example 1 else 0! Does anybody know something about this function!? I think its called inb(); Thanx!

  2. #2
    Join Date
    Feb 2003
    what you are going to need to do is "poll" the pins. This can be done in multiple ways, but if you want the simplest, just go with a while loop that reads data from those pins, then calls/does something when you recieve certain results.
    there used to be something here, but not anymore

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Immediate programming help! Please!
    By xMEGANx in forum C++ Programming
    Replies: 6
    Last Post: 02-20-2008, 11:52 AM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Segmentation Fault - Trying to access parallel port
    By tvsinesperanto in forum C Programming
    Replies: 3
    Last Post: 05-24-2006, 03:28 AM
  4. Problem with simple case statements
    By shoobsie in forum C Programming
    Replies: 2
    Last Post: 05-08-2006, 08:39 AM
  5. linked list recursive function spaghetti
    By ... in forum C++ Programming
    Replies: 4
    Last Post: 09-02-2003, 02:53 PM
Website Security Test