View Single Post
  #2   Spotlight this post!  
Unread 08-03-2003, 19:22
Jeff_Rice's Avatar
Jeff_Rice Jeff_Rice is offline
ElementisRegamusProelium
#1359
Team Role: Programmer
 
Join Date: Dec 2002
Location: Linn County
Posts: 283
Jeff_Rice will become famous soon enoughJeff_Rice will become famous soon enough
That won't work. You'll have to program a timer in. The stamp cycles about once every 26 milliseconds.

Time var byte
Timeover var bit

If timeover = 1 then timeroff

Time = time + 1 + delta_t 'make sure to turn delta_t on,
' otherwise this won't work
relay1_fwd = 1

If time < 20 then dont_turn_off
relay1_fwd = 0
Timeover=1

dont_turn_off:
timeroff:

'PBasic takes inputs, and sends outputs accordingly once every
'cycle. That is why your code doesn't work.
'I think the pause just pauses the cycle. I haven't ever used it.
'Good luck on your programming! Feel free to ask other any other
'questions.
__________________
"He said my name is Private Andrew Malone
If you're reading this then I didn't make it home
But for every dream that's shattered another one comes true
This car was once a dream of mine now it belongs to you
And though you may take her and make her your own
You'll always be riding with Private Malone" David Ball, "Private Malone"