Shop OBEX P1 Docs P2 Docs Learn Events
Improve program....... — Parallax Forums

Improve program.......

AndroidAndroid Posts: 82
edited 2012-06-09 20:40 in General Discussion
This program is the first one that ive written for the Ping))) senor please improve so that ping is constantly sending out a pulse.
here is the program


ping PIN 15
rawdist VAR WORD
counter VAR WORD
DO
PULSOUT ping, 5
PULSIN ping, 1, rawdist
IF rawdist < 600 THEN
FOR counter = 1 TO 500
PULSOUT 13, 650
PULSOUT 12, 850
NEXT
ELSE
PULSOUT ping, 5
FOR counter = 1 TO 500
PULSOUT 13, 850
PULSOUT 12, 650
NEXT
ENDIF
LOOP
Please post the improved program not as a PDF

-Android

Comments

Sign In or Register to comment.