here is my program that is supposed to make my tracked robot move towards light sources over a ceratin brightness. however, when it runs on the PICAXE28x1, it goes forward if it is started in the light, but as soon as the light level drops it turns left and does nothing else. Can anyone find the flaw in my programming?
main:
let pins = 160 'forward
label_33: readadc 3,b3 'read light sensor
if b3< 120 then label_1E 'if light =below level 120 turn and look again
let pins = 160 'forward
goto label_33
label_1E: let pins = 144 'left
wait 2
let pins = 0 'halt
goto label_33