How would I say this?
bobsmith
Posts: 36
how do i say
don't activate this code below until the trigger is pulled 3 times then 4th time goes into this code and if trigger doesn't = 1 for more then 1 second repeat the process of pulling trigger 3 times and 4th time equals code below
DO
··· IF Fire = 1 THEN
····· shots = shots + 1
····· HIGH Solenoid
····· PAUSE 10
····· LOW Solenoid
····· PAUSE 40
··· ELSE
····· shots = 0
····· PAUSE 50
··· ENDIF
· LOOP WHILE (shots < 20)
· END
don't activate this code below until the trigger is pulled 3 times then 4th time goes into this code and if trigger doesn't = 1 for more then 1 second repeat the process of pulling trigger 3 times and 4th time equals code below
DO
··· IF Fire = 1 THEN
····· shots = shots + 1
····· HIGH Solenoid
····· PAUSE 10
····· LOW Solenoid
····· PAUSE 40
··· ELSE
····· shots = 0
····· PAUSE 50
··· ENDIF
· LOOP WHILE (shots < 20)
· END
Comments
Get_Trigger:
· timer = 0···························· ' manages timing (byte)
· pulls = 0···························· ' trigger pulls (nib)
· started = 0·························· ' timing started (bit)
··DO
··· DO································· ' wait for trigger press
····· PAUSE 25························· ' pad loop (affects timer)
····· timer = timer + started·········· ' update timer if running
····· IF (timer > 40) THEN Get_Trigger· ' restart on timout
··· LOOP UNTIL (Trigger = Yes)
··· started = 1························ ' start timing
··· DO································· ' wait for trigger release
····· PAUSE 25························· ' pad loop (affects timer)
····· timer = timer + 1·················' update timer
····· IF (timer > 40) THEN Get_Trigger· ' restart on timout
··· LOOP UNTIL (Trigger = No)
··· pulls = pulls + 1·················· ' update trigger pulls
· LOOP UNTIL (pulls = 4)
· RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Post Edited (Jon Williams) : 9/28/2004 10:07:18 PM GMT