Skip to content

Instantly share code, notes, and snippets.

@matael
Forked from Aluriak/Tom.c
Created December 23, 2011 11:23
Show Gist options
  • Save matael/1513923 to your computer and use it in GitHub Desktop.
Save matael/1513923 to your computer and use it in GitHub Desktop.
NXC : Tom
// 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
}
@matael
Copy link
Author

matael commented Dec 23, 2011

j'ai juste ajouté quelques commentaires, l'indentation, et virés les bousins et autres shmilblick...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment