Improve program.......
Android
Posts: 82
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
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
and report back
It will make it easier for us to help with your code if you use code blocks. Here's a link to instructions on how to use them.
Forum members are usually willing to help with programming questions but it's unlikely many will want to write a program for you.
- Android