mark Easterling
New Member
I am using the code below on a 08M2. The circuit runs well for about 10 seconds then goes wrong and flashes the LED's on/off very quickly and that all it does? Can anyone help please?
symbol z = w6
init: let dirs = %00010111
main:
label0:
Switch off 4
Switch off 2
Switch off 1
Switch off 0
pause 200
Switch on 4
Switch on 2
Switch on 1
Switch on 0
pause 200
random z
if Input3 is On then label0
if z > 55000 then label1
if z > 44000 then label2
if z > 33000 then label3
if z > 22000 then label4
if z > 11000 then label5
Switch on 4
Switch off 2
Switch off 1
Switch off 0
label6:
pause 2000
goto label0
label5:
Switch off 4
Switch on 2
Switch off 1
Switch off 0
goto label6
label4:
Switch on 4
Switch on 2
Switch off 1
Switch off 0
goto label6
label3:
Switch off 4
Switch on 2
Switch on 1
Switch off 0
goto label6
label2:
Switch on 4
Switch on 2
Switch on 1
Switch off 0
goto label6
label1:
Switch off 4
Switch on 2
Switch on 1
Switch on 0
goto label6
symbol z = w6
init: let dirs = %00010111
main:
label0:
Switch off 4
Switch off 2
Switch off 1
Switch off 0
pause 200
Switch on 4
Switch on 2
Switch on 1
Switch on 0
pause 200
random z
if Input3 is On then label0
if z > 55000 then label1
if z > 44000 then label2
if z > 33000 then label3
if z > 22000 then label4
if z > 11000 then label5
Switch on 4
Switch off 2
Switch off 1
Switch off 0
label6:
pause 2000
goto label0
label5:
Switch off 4
Switch on 2
Switch off 1
Switch off 0
goto label6
label4:
Switch on 4
Switch on 2
Switch off 1
Switch off 0
goto label6
label3:
Switch off 4
Switch on 2
Switch on 1
Switch off 0
goto label6
label2:
Switch on 4
Switch on 2
Switch on 1
Switch off 0
goto label6
label1:
Switch off 4
Switch on 2
Switch on 1
Switch on 0
goto label6