Guillaume Chauvon
/
Asserve12
asser1
Diff: main.cpp
- Revision:
- 2:5764f89a27f6
- Parent:
- 1:0690cf83f060
- Child:
- 3:1dba6eca01ad
diff -r 0690cf83f060 -r 5764f89a27f6 main.cpp --- a/main.cpp Wed Dec 12 20:03:07 2018 +0000 +++ b/main.cpp Wed Apr 17 18:55:22 2019 +0000 @@ -3,39 +3,29 @@ #include "hardware.h" #include "odometrie.h" #include "reglages.h" -#include "tests_moteurs.h" +#include "commande_moteurs.h" int main() { //init init_odometrie(); init_hardware(); - - + srand(time(NULL)); + motors_on(); + //Pause pour sauver le robot et l'ordi wait(3); - - test_ligne_droite(162000, 600); - test_rotation_rel(90,100); - test_ligne_droite(74000,300); - - /*while(1) - { - for (int i =0; i<4; i++) - { - test_ligne_droite(30000,500); - - test_rotation_rel(90,100); + //ligne_droite(150000); + //commande_vitesse(500,500); + /*for(int j = 0; j<5;j++){ + for (int i =0; i< 4;i++){ + ligne_droite(50000); + test_rotation_rel(90); } - test_rotation_abs(0,100); - - for (int i =0; i<4; i++) - { - test_ligne_droite(150000, 600); - test_rotation_rel(180,100); - } - test_rotation_abs(0,100); + wait(1); }*/ - - + reculer_un_peu(50000); + /*for (int i = 0; i< 10; i++){ + test_rotation_rel(180); + }*/ return 0; }