Bonjour,je débute tout juste en programmation,j'ai achté un robot picaxe avec un suiveur de ligne.J'ai voulu lui apprendre a suivre une ligne en lui rentrant ce preogramme:
start:
forward a
forward b
main:
readadc c.2,b2
if b2>190 then
goto test
endif
if b2<190 then
goto start
endif
test:
pause 100
forward a
forward b
if b2<190 then
halt a
pause 100
halt b
endif
if b2>190then
goto start
endif
if b2<190 then
forward a
pause 250
halt a
end if
if b2>190 then
goto start
endif
if b2<190 then
goto test
end if
Seulement voila,en rentrant le programme dans le robot il avence tout droit
Est-ce que c'est un probleme se syntax?Le logiciel n'a pourtant trouvé aucune erreurs...
Si quelqun pouvait m'aider a y voir un peu plus clair,ce serait sympa...
merci d'avence
start:
forward a
forward b
main:
readadc c.2,b2
if b2>190 then
goto test
endif
if b2<190 then
goto start
endif
test:
pause 100
forward a
forward b
if b2<190 then
halt a
pause 100
halt b
endif
if b2>190then
goto start
endif
if b2<190 then
forward a
pause 250
halt a
end if
if b2>190 then
goto start
endif
if b2<190 then
goto test
end if
Seulement voila,en rentrant le programme dans le robot il avence tout droit
Est-ce que c'est un probleme se syntax?Le logiciel n'a pourtant trouvé aucune erreurs...
Si quelqun pouvait m'aider a y voir un peu plus clair,ce serait sympa...
merci d'avence