BobDevries
 Senior Member
 Joined: 08/06/2011 Location: AustraliaPosts: 266 |
| Posted: 09:43pm 28 Jun 2011 |
|
|
|
By the way....
NEVER use the TIMER function to get a specific value if you're executing other code while waiting for it. Chances are that you'll miss your target value.
10 SETPIN 10,8
20 TIMER = 0: PIN(10) = 1
30 DO WHILE TIMER < 500
40 GOSUB 100
50 LOOP
60 TIMER = 0: PIN(10) = 0
70 DO WHILE TIMER < 500
80 GOSUB 120
90 LOOP
60 END
100 REM subroutine to do something while you're waiting
110 RETURN
120 REM another subroutine
130 RETURN
Regards,
Bob Devries Dalby, QLD, Australia |