Shop OBEX P1 Docs P2 Docs Learn Events
count duration — Parallax Forums

count duration

TobiasTobias Posts: 95
edited 2006-12-28 16:17 in BASIC Stamp
I am working on a Project where I am getting a signal input of· 1 to 4 counts but sometimes there are bursts of like 11 or 22 so I would like to have the code to the BS2 that if the input pin has anything greater then 3 for x amount of time goto setting1:
-Tobias

Comments

  • NewzedNewzed Posts: 2,503
    edited 2006-12-28 15:38
    Tobias, what length of time are you counting?

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Don't have VGA?

    Newzed@aol.com
    ·
  • TobiasTobias Posts: 95
    edited 2006-12-28 16:04
    I am using the
    count 8, 10, mph
    command,
    8 =pin#
    10=duration
    and mph is the value it will display
  • NewzedNewzed Posts: 2,503
    edited 2006-12-28 16:17
    Try this, Tobias

    count 8, 10, mph
    if mph>3 then setting1
    'continue with what you were doing

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Don't have VGA?

    Newzed@aol.com
    ·
Sign In or Register to comment.