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