|
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"
|