'definition entrees/sorties symbol ir = B.3 symbol ll = C.0 symbol lr = B.5 'definition variables symbol ob = b1 'programme main: gosub obstacle if ob > 100 then esquiver if ob < 100 then avancer goto main 'sous programme obstacle: readadc ir,ob return avancer: pulsout c.2,220 pause 150 pulsout c.1,165 pulsout b.4,165 pause 150 pulsout c.2,80 pause 150 pulsout c.1,135 pulsout b.4,135 pause 150 goto main esquiver: low c.0 low b.5 pulsout c.2,80 pause 150 pulsout c.1,165 pulsout b.4,165 pause 150 pulsout c.2,220 pause 150 pulsout c.1,135 pulsout b.4,135 pause 150 pulsout c.2,80 pause 150 pulsout c.1,165 pulsout b.4,135 pause 150 pulsout c.2,220 pause 150 pulsout c.1,135 pulsout b.4,165 pause 150 pulsout c.2,80 pause 150 pulsout c.1,165 pulsout b.4,135 pause 150 pulsout c.2,220 pause 150 pulsout c.1,135 pulsout b.4,165 pause 150 high c.0 high b.5 goto main