Copy-paste screwed up the code, here it is:
Code:Speed CON 24 ; Smaller=Faster TracerSpeed CON 15 ; Smaller=Faster Left/Right Brightness CON 255 ; Tracers DutyCycle DrainSpeed CON 30 ; Smaller=Shorter Trail BAM_COUNT = 5 Main: if LoopCount = TracerSpeed then ; __[ Cylon/Kitt Scanner ]__ LoopCount = 0 BAM_DUTY(NextLED)=Brightness if TraceDIR then ; if scanning left NextLED = NextLED - 1 if NextLED = 0 then TraceDIR = 0 else ; else scanning right NextLED = NextLED + 1 if NextLED = BAM_COUNT-1 then TraceDIR = 1 endif endif FOR Idx = 0 to BAM_COUNT - 1 ; Drain all dutycycles IF BAM_DUTY(Idx) > 0 then BAM_DUTY(Idx)=BAM_DUTY(Idx)*DrainSpeed/(DrainSpeed+1) ENDIF NEXT Idx pause Speed LoopCount = LoopCount + 1 GOTO Main




Bookmarks