-
-
Save matael/1513923 to your computer and use it in GitHub Desktop.
NXC : Tom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tom fait des carrés, de plus en plus grands | |
void carre(int dist) { | |
int i; | |
for(i=0;i<4;i++){ | |
RotateMotor(OUT_BC, 75 ,360*dist); // 360degrés ~= 10cm | |
RotateMotorEx(OUT_BC,75,540,-100, true, false); // fait tourner le robot de 90degrés | |
} | |
} | |
task main() { | |
carre(1); // 10 cm | |
carre(2); // 20 cm | |
carre(3); // 30 cm | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
j'ai juste ajouté quelques commentaires, l'indentation, et virés les bousins et autres shmilblick...