;lightning cloud v1.0
;for picaxe-08m2
;chris landscheit feb 2023
initialise: ; set up ports, variables and processor speed
#picaxe 08m2 ; define picaxe chip for compiler
setfreq m4 ; select internal resonator 4MHz (for accurate timing)
symbol stepsequence=b20 ; define stepsequence variable
symbol outputsequence=b21 ; define outputsequence variable
symbol setspeed=b22 ; define setspeed variable
let dirsc=%11111111 ; set port c as outputs (only c.0, c.1, c.2, c.4 used)
main:
let setspeed=1 ; set speed variable (to be changed as required)
sequence1:
for stepsequence=0 to 255
lookup stepsequence,(%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111,%00000000,%11111111),outputsequence ; select sequence
let pinsc=outputsequence ; output to leds (pins c.0, c.1, c.2, c.4)
pause setspeed ; pause to adjust speed
next stepsequence ; next step
pause 5000 ; delay until next sequence
goto sequence1 ; loop back and repeat