SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist pompopom's Avatar
    Join Date
    Feb 2004
    Location
    Huldenberg (Belgium)
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trigger Javascript on serial port event

    Hi everyone,

    has anyone done this before?

    trigger javascript on serial port event.

    how can it be done?

    greetz,
    Koen
    The Path of excess leeds to the tower of wisdom (W. Blake)

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,449
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Can't be done. Sorry.

  3. #3
    SitePoint Evangelist pompopom's Avatar
    Join Date
    Feb 2004
    Location
    Huldenberg (Belgium)
    Posts
    426
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any workarounds?
    trigger script in another language, that activates a javascript?

    the goal is this:
    - there are 3 camera's connected to a PC/Server.
    - this PC/Server is located in a car.
    - every 10m. there must be taken a snapshot of the environment

    distance is measured with an odometer wich can be connected to the serial/parallel port.
    so every 10m the odometer gives a pulse on the port, triggering the script that makes the snapshot.

    any ideas?
    thx
    Koen
    The Path of excess leeds to the tower of wisdom (W. Blake)

  4. #4
    SitePoint Evangelist
    Join Date
    Mar 2006
    Location
    Sweden
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, you could query the server with Ajax every tenth second.

  5. #5
    SitePoint Enthusiast
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could have a look at some of these links

    http://www.lvr.com/serport.htm#com_port_terminal

  6. #6
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Depends on the pc you're using. If it were windows:
    - create a com object that listens to the serial port and can raise an event when it occurs
    - build a program that uses the com object to take the pictures - be that .net or c++ or php

    Maybe html/javascript is a tough way to do it in this case? Not impossible, perhaps not the best way, depends on what you need


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •