Like Tree3Likes
  • 2 Post By Fordy
  • 1 Post By Salem

Tigger Signal

This is a discussion on Tigger Signal within the C++ Programming forums, part of the General Programming Boards category; Hello, currently Im working with a programm, that is a software to a thermal camera. Its an opensource, so I ...

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

    Tigger Signal

    Hello,

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

  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 Im 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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,656
    > I`ve done some research and found out, that might be possible with serial or parallel port.
    ...
    > But Im 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.
    Elkvis likes this.
    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.

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

  9. #9
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    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-17-2010, 11:50 PM
  2. Where's the EPIPE signal?
    By marc.andrysco in forum Networking/Device Communication
    Replies: 0
    Last Post: 12-23-2006, 07:04 PM
  3. Signal begginer
    By eomer in forum C++ Programming
    Replies: 4
    Last Post: 12-13-2006, 10: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, 05:46 PM

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