Shop OBEX P1 Docs P2 Docs Learn Events
Pir Control for digital clock controlling other I`Os — Parallax Forums

Pir Control for digital clock controlling other I`Os

maxpowermaxpower Posts: 1
edited 2006-11-16 16:34 in BASIC Stamp
i am currently designing a small electronic project with a pir· ·sensor to control 2 7 segment displays as well i have a program to control a clock to be set at different time levels. I am trying to interface the 2 programs so when the clock get to a certain value it will put a halt on the 2 seven segement displays. a sample of my codes are as follows:

HIGH 9
PAUSE 30000
DO
IF (IN5 = 1) THEN
HIGH 14
PAUSE 1000
LOW 14
PAUSE 4500
ELSE
ENDIF
LOOP
the above with count when the pir is activated

PAUSE 3
counter VAR Byte
FOR counter = 1 TO 30
DEBUG ? counter
HIGH 15
PAUSE 500
LOW 15
PAUSE 500
NEXT
DO
LOW 15
LOOP
END
the above here will count to 30
what i wish on doing is having both programs running at once on the same B.O.E and to control pin 9 from the clock if anyone has any suggestions i`ll be greatfull to here from you.
thanks
Sign In or Register to comment.