View Single Post
  #5   Spotlight this post!  
Unread 19-02-2003, 20:05
redbeard0531 redbeard0531 is offline
Registered User
#0686 (Bovine Intervention)
 
Join Date: Jan 2003
Location: New Market, MD
Posts: 40
redbeard0531 is an unknown quantity at this point
Send a message via AIM to redbeard0531
<edit>Removed stuff covered by people who replied faster that me.</edit>

Here is what I suggest.

GoSub Fire3:

Fire3:

count Var word 'Number of 26ms periods
Fire3On Var Bit ' 1 if the piston should fire

If p2_sw_trig = 1 then Fire3On = 1

If Fire3On = 0 Then DontFire:

If count < 3000 then
relay1_fwd = 1
count = count + 1 + delta_t
Else
relay1_fwd = 0
count = 0
Fire3On = 0
EndIf

DontFire:

Return

That is how I would do it, but it may not be exactly what you need.

Last edited by redbeard0531 : 19-02-2003 at 20:07.