assert1
Dependencies: mbed X_NUCLEO_IHM02A1
main.cpp@3:06cbe2f6c494, 2019-03-30 (annotated)
- Committer:
- JimmyAREM
- Date:
- Sat Mar 30 15:10:23 2019 +0000
- Revision:
- 3:06cbe2f6c494
- Parent:
- 2:977799d72329
odo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Coconara | 0:6ca63d45f0ee | 1 | #include "mbed.h" |
Coconara | 0:6ca63d45f0ee | 2 | |
Coconara | 0:6ca63d45f0ee | 3 | #include "hardware.h" |
Coconara | 0:6ca63d45f0ee | 4 | #include "odometrie.h" |
Coconara | 0:6ca63d45f0ee | 5 | #include "reglages.h" |
Coconara | 0:6ca63d45f0ee | 6 | #include "tests_moteurs.h" |
Pierr | 2:977799d72329 | 7 | #include "chemin.h" |
Coconara | 0:6ca63d45f0ee | 8 | |
Coconara | 0:6ca63d45f0ee | 9 | int main() |
Coconara | 0:6ca63d45f0ee | 10 | { |
Coconara | 0:6ca63d45f0ee | 11 | //init |
Pierr | 2:977799d72329 | 12 | printf("I'm waking up...\n"); |
Coconara | 0:6ca63d45f0ee | 13 | init_odometrie(); |
Coconara | 0:6ca63d45f0ee | 14 | init_hardware(); |
Pierr | 2:977799d72329 | 15 | printf("I'm waked up after init...\n"); |
Pierr | 2:977799d72329 | 16 | printf("tirette passee\n"); |
JimmyAREM | 3:06cbe2f6c494 | 17 | while(1) |
JimmyAREM | 3:06cbe2f6c494 | 18 | { |
JimmyAREM | 3:06cbe2f6c494 | 19 | while(tirette.read()==0) |
JimmyAREM | 3:06cbe2f6c494 | 20 | { |
JimmyAREM | 3:06cbe2f6c494 | 21 | } |
JimmyAREM | 3:06cbe2f6c494 | 22 | set_PWM_moteur_G(300); |
JimmyAREM | 3:06cbe2f6c494 | 23 | set_PWM_moteur_D(285); |
JimmyAREM | 3:06cbe2f6c494 | 24 | } |
JimmyAREM | 3:06cbe2f6c494 | 25 | // test_ligne_droite(150000, -100); |
JimmyAREM | 3:06cbe2f6c494 | 26 | test_rotation_rel(90,50); |
JimmyAREM | 3:06cbe2f6c494 | 27 | // test_ligne_droite(150000,-100); |
JimmyAREM | 3:06cbe2f6c494 | 28 | // test_rotation_rel(90,50); |
Pierr | 2:977799d72329 | 29 | //test_ligne_droite(20000,-100); |
Pierr | 2:977799d72329 | 30 | //test_rotation_rel(-90,50); |
Pierr | 2:977799d72329 | 31 | |
Coconara | 1:0690cf83f060 | 32 | |
Coconara | 1:0690cf83f060 | 33 | /*while(1) |
Coconara | 1:0690cf83f060 | 34 | { |
Coconara | 1:0690cf83f060 | 35 | for (int i =0; i<4; i++) |
Coconara | 1:0690cf83f060 | 36 | { |
Coconara | 1:0690cf83f060 | 37 | test_ligne_droite(30000,500); |
Coconara | 0:6ca63d45f0ee | 38 | |
Coconara | 1:0690cf83f060 | 39 | test_rotation_rel(90,100); |
Coconara | 1:0690cf83f060 | 40 | } |
Coconara | 1:0690cf83f060 | 41 | test_rotation_abs(0,100); |
Coconara | 1:0690cf83f060 | 42 | |
Coconara | 1:0690cf83f060 | 43 | for (int i =0; i<4; i++) |
Coconara | 1:0690cf83f060 | 44 | { |
Coconara | 1:0690cf83f060 | 45 | test_ligne_droite(150000, 600); |
Coconara | 1:0690cf83f060 | 46 | test_rotation_rel(180,100); |
Coconara | 1:0690cf83f060 | 47 | } |
Coconara | 1:0690cf83f060 | 48 | test_rotation_abs(0,100); |
Coconara | 1:0690cf83f060 | 49 | }*/ |
Pierr | 2:977799d72329 | 50 | |
Pierr | 2:977799d72329 | 51 | //init_terrain(); |
Pierr | 2:977799d72329 | 52 | //afficher_terrain(); |
Pierr | 2:977799d72329 | 53 | |
Pierr | 2:977799d72329 | 54 | |
JimmyAREM | 3:06cbe2f6c494 | 55 | //aller_a_point(20,180,270,180); |
Pierr | 2:977799d72329 | 56 | |
JimmyAREM | 3:06cbe2f6c494 | 57 | //aller_a_point(270,180,20,180); |
Pierr | 2:977799d72329 | 58 | |
JimmyAREM | 3:06cbe2f6c494 | 59 | //test_rotation_rel(180,100); |
Coconara | 0:6ca63d45f0ee | 60 | |
Coconara | 0:6ca63d45f0ee | 61 | return 0; |
Coconara | 0:6ca63d45f0ee | 62 | } |