blob: a5d5b7c64366ca425d51e581a36a55131c6f6310 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
1 REM cylon demo program using RC2014 digital IO board
2 REM buttons may be pressed to alter speed
5 DL=150
6 DN=150
10 FOR F=0 TO 7
20 OUT 0,2^F
30 GOSUB 1000
40 NEXT F
50 FOR F=7 TO 0 STEP -1
60 OUT 0,2^F
70 GOSUB 1000
80 NEXT F
90 GOTO 10
1000 X=0
1010 BU=INP(0)
1020 IF BU <> 0 THEN DN = BU*5
1030 IF DN <> DL THEN DL=DN : PRINT DN : RETURN
1040 IF X > DL THEN RETURN
1050 X=X+1
1060 GOTO 1010
|