var parti var itera = 0 timer.period[0]=1000 onevent timer0 if parti==1 then itera = itera + 1 if itera==1 then motor.left.target = -200 motor.right.target = 200 call leds.top(16,16,0) end if itera==2 then motor.left.target = vitesse_avant motor.right.target = vitesse_avant call leds.top(22,10,0) end if itera==3 then motor.left.target = 240 motor.right.target = -240 call leds.top(32,0,0) end if itera==4 then motor.left.target = vitesse_avant motor.right.target = vitesse_avant call leds.top(16,0,16) end if itera==5 then motor.left.target = -200 motor.right.target = 200 call leds.top(10,0,22) end if itera==6 then motor.left.target = vitesse_avant motor.right.target = vitesse_avant call leds.top(0,0,32) end if itera==7 then motor.left.target = 240 motor.right.target = -240 call leds.top(0,16,16) end if itera==8 then motor.left.target = vitesse_avant motor.right.target = vitesse_avant call leds.top(0,22,10) itera = 0 end end onevent rc5 if rc5.command==32 then parti=1 itera=0 end if rc5.command==33 then parti = 0 motor.left.target = 0 motor.right.target = 0 end