while not (button.center == 1) do if prox.ground.delta[1] < 200 and prox.ground.delta[0] < 200 then motor.left.target = 300 motor.right.target = 300 call leds.circle(80,0,0,0,0,0,0,0) end if prox.ground.delta[1] > 200 then motor.left.target = 0 motor.right.target = 500 call leds.circle(0,0,0,0,0,0,32,0) end if prox.ground.delta[0] > 200 then motor.left.target = 500 motor.right.target = 0 call leds.circle(0,0,32,0,0,0,0,0) end if prox.horizontal[2] > 2000 then while not (button.center == 1) do motor.left.target = 0 motor.right.target = 0 end end end UNTIL TRUE button.center TRUE AND TRUE LT 0 prox.ground.delta[1] 0 200 TRUE LT 0 prox.ground.delta[0] 0 200 FORWARD 300 300 32 80 32 0 32 0 32 0 32 0 32 0 32 0 32 0 TRUE GT 0 prox.ground.delta[1] 0 200 TURNLEFT 300 500 32 0 32 0 32 0 32 0 32 0 32 0 32 32 32 0 TRUE GT 0 prox.ground.delta[0] 0 200 TURNRIGHT 300 500 32 0 32 0 32 32 32 0 32 0 32 0 32 0 32 0 TRUE prox.horizontal[2] PROX UNTIL TRUE button.center