Thread: Tigger Signal

  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    4

    Tigger Signal

    Hello,

    currently I´m working with a programm, that is a software to a thermal camera. Its an opensource, so I can change anything I want.

    There is an Alarm function, that triggers beeping after reaching some temperature. I have to change this function, so I could get a 5V trigger signal from my pc to some device, that stops heating etc.

    I`ve done some research and found out, that might be possible with serial or parallel port. How could I use those in C++? Are there any turorials?

    Thx in advance!

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    I assume you mean Trigger not Winnie the Pooh's mate?

    For this to work you need to say what OS you are working on.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Jan Axelson's Lakeview Research

    Specific details depend greatly on your operating system and compiler.
    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.

  4. #4
    Registered User
    Join Date
    Jul 2012
    Posts
    4
    Yes, Fordy, honest mistake! Its Trigger ofcourse.

    Im working with windows 7, microsoft visual 2010
    Last edited by FilthyLucre; 07-19-2012 at 03:56 AM.

  5. #5
    Registered User
    Join Date
    Jul 2012
    Posts
    4
    But I´m still unsure, whether it is possible to do with usb. As far as I know, there is only constant output, and I need only a trigger.

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > I`ve done some research and found out, that might be possible with serial or parallel port.
    ...
    > But I´m still unsure, whether it is possible to do with usb.
    Well you could decide which interface to use.

    If you've got a parallel port, then that's perhaps the simplest option, as there are a few pins where you can directly manipulate the signal level.

    You could probably do the same with a serial line, by manipulating CTS/RTS.

    USB is different, it is a protocol as well as an electrical interface. You can't just manipulate the signal level as you would want.

    FWIW, if you're trying to control something like "turn a heater on and off", which is going to need a lot of power, then perhaps an interface like this is something you should look for.

    Eg.
    Serial Port Relay Board
    There are plenty of suppliers of this kind of kit; check your local electronics shop.
    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.

  7. #7
    Registered User
    Join Date
    Jul 2012
    Posts
    4
    Quote Originally Posted by Salem View Post
    > I`ve done some research and found out, that might be possible with serial or parallel port.
    ...
    > But I´m still unsure, whether it is possible to do with usb.
    Well you could decide which interface to use.

    If you've got a parallel port, then that's perhaps the simplest option, as there are a few pins where you can directly manipulate the signal level.

    You could probably do the same with a serial line, by manipulating CTS/RTS.

    USB is different, it is a protocol as well as an electrical interface. You can't just manipulate the signal level as you would want.

    FWIW, if you're trying to control something like "turn a heater on and off", which is going to need a lot of power, then perhaps an interface like this is something you should look for.

    Eg.
    Serial Port Relay Board
    There are plenty of suppliers of this kind of kit; check your local electronics shop.
    Thx a lot for your reply!

    There is surely an option to buy PCI to Parallel port device, that is cheap. So its not a problem.

    The thing is, I dont really undestand, how I could manipulate with this parallel port in C++. Are there any tips?

  8. #8
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Do you have a specific interface board in mind?
    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.

  9. #9
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Do you have to use you're computer for this?

    The Raspberry PI board that was released this year runs a full GUI version of Linux, costs about £25 (I think its under $30) and has programmable GPIO pins

    https://www.google.co.uk/webhp?sourc...w=1440&bih=815

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. signal vs sigaction
    By bhrugu in forum C Programming
    Replies: 1
    Last Post: 01-18-2010, 12:50 AM
  2. Where's the EPIPE signal?
    By marc.andrysco in forum Networking/Device Communication
    Replies: 0
    Last Post: 12-23-2006, 08:04 PM
  3. Signal begginer
    By eomer in forum C++ Programming
    Replies: 4
    Last Post: 12-13-2006, 11:31 AM
  4. Signal
    By Gerard Fremaint in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 09-10-2002, 02:03 PM
  5. signal.h
    By DavidP in forum C++ Programming
    Replies: 1
    Last Post: 02-19-2002, 06:46 PM