Guillaume Chauvon
/
Asserve12
asser1
main.cpp@2:5764f89a27f6, 2019-04-17 (annotated)
- Committer:
- GuillaumeCH
- Date:
- Wed Apr 17 18:55:22 2019 +0000
- Revision:
- 2:5764f89a27f6
- Parent:
- 1:0690cf83f060
- Child:
- 3:1dba6eca01ad
p
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" |
GuillaumeCH | 2:5764f89a27f6 | 6 | #include "commande_moteurs.h" |
Coconara | 0:6ca63d45f0ee | 7 | |
Coconara | 0:6ca63d45f0ee | 8 | int main() |
Coconara | 0:6ca63d45f0ee | 9 | { |
Coconara | 0:6ca63d45f0ee | 10 | //init |
Coconara | 0:6ca63d45f0ee | 11 | init_odometrie(); |
Coconara | 0:6ca63d45f0ee | 12 | init_hardware(); |
GuillaumeCH | 2:5764f89a27f6 | 13 | srand(time(NULL)); |
GuillaumeCH | 2:5764f89a27f6 | 14 | motors_on(); |
GuillaumeCH | 2:5764f89a27f6 | 15 | //Pause pour sauver le robot et l'ordi |
Coconara | 1:0690cf83f060 | 16 | wait(3); |
GuillaumeCH | 2:5764f89a27f6 | 17 | //ligne_droite(150000); |
GuillaumeCH | 2:5764f89a27f6 | 18 | //commande_vitesse(500,500); |
GuillaumeCH | 2:5764f89a27f6 | 19 | /*for(int j = 0; j<5;j++){ |
GuillaumeCH | 2:5764f89a27f6 | 20 | for (int i =0; i< 4;i++){ |
GuillaumeCH | 2:5764f89a27f6 | 21 | ligne_droite(50000); |
GuillaumeCH | 2:5764f89a27f6 | 22 | test_rotation_rel(90); |
Coconara | 1:0690cf83f060 | 23 | } |
GuillaumeCH | 2:5764f89a27f6 | 24 | wait(1); |
Coconara | 1:0690cf83f060 | 25 | }*/ |
GuillaumeCH | 2:5764f89a27f6 | 26 | reculer_un_peu(50000); |
GuillaumeCH | 2:5764f89a27f6 | 27 | /*for (int i = 0; i< 10; i++){ |
GuillaumeCH | 2:5764f89a27f6 | 28 | test_rotation_rel(180); |
GuillaumeCH | 2:5764f89a27f6 | 29 | }*/ |
Coconara | 0:6ca63d45f0ee | 30 | return 0; |
Coconara | 0:6ca63d45f0ee | 31 | } |