Problem coding Banner sensor interrupt...

This is a discussion on Problem coding Banner sensor interrupt... within the C Programming forums, part of the General Programming Boards category; We are trying to program a banner sensor interrupt in C. There are three possible positions(numbered 1, 2 &3) for ...

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    1

    Question Problem coding Banner sensor interrupt...

    We are trying to program a banner sensor interrupt in C. There are three possible positions(numbered 1, 2 &3) for the banner sensor to see and two directions that it can travel (forward and reverse). We have no problem with the sensor seeing the targets. Our problem comes when we stop between target 1 & 2 or between target 2 & 3 and then reverse direction. The program seems to get confused as to where it is and what the count is so that if it stops between target 2 & 3and reverses direction it thinks it sees target number 3 when it is actually seeing target number 2.

    I am certain we are missing something simple. Can anyone help??

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,544
    So do you get either of
    - the current direction of travel
    - the ID of the target being detected
    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. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  2. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 05:24 PM
  3. Replies: 16
    Last Post: 01-26-2006, 01:38 PM
  4. Replies: 5
    Last Post: 11-07-2005, 10:34 PM
  5. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM

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