Reading serialport

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Laban

    Reading serialport

    Does anyone know how I can fetch a trigger/break signal via the
    serial-port?

    I have a circuit that connects two pins on the serial-port when the
    sensor is activated (when a person stands infront of the photocell).

    How can I get this to interact with my Java code? Or is there a better
    alternative then the com-port?

    I want a piece of code to run while the cercuit is connected, and to
    stop when the person leaves the photocell.

    Please help! It's pretty urgent. Should have posted this way earlier.
    I've understood that I should use javax.comm, but unfortunaly I don't
    know how/what to do with it.
  • SPG

    #2
    Re: Reading serialport

    There is a JAVAX extention called JAVACOMM which provides all the
    functionality you need.
    It is on the java.sun.com website.

    Steve

    "Laban" <[email protected]> wrote in message
    news:99ba3106.0 311040041.2a6f9 [email protected] gle.com...[color=blue]
    > Does anyone know how I can fetch a trigger/break signal via the
    > serial-port?
    >
    > I have a circuit that connects two pins on the serial-port when the
    > sensor is activated (when a person stands infront of the photocell).
    >
    > How can I get this to interact with my Java code? Or is there a better
    > alternative then the com-port?
    >
    > I want a piece of code to run while the cercuit is connected, and to
    > stop when the person leaves the photocell.
    >
    > Please help! It's pretty urgent. Should have posted this way earlier.
    > I've understood that I should use javax.comm, but unfortunaly I don't
    > know how/what to do with it.[/color]


    Comment

    • Rick

      #3
      Re: Reading serialport

      If you're familiar with C or assembler I suggest you do it first there. Then
      make a DLL and use it in you Java app.

      Greetings,
      Rick


      Comment

      Working...