Parallel Port! Detect incoming current, posible?

This is a discussion on Parallel Port! Detect incoming current, posible? within the Networking/Device Communication forums, part of the General Programming Boards category; Hello! I have little knowledge about parallel port programming on Linux. I wan't to know if its possible to like ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    30

    Parallel Port! Detect incoming current, posible?

    Hello!
    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
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,500
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21