Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
pins.cpp@5:34ed652f8c31, 2020-07-21 (annotated)
- Committer:
- Nanaud
- Date:
- Tue Jul 21 19:33:38 2020 +0000
- Revision:
- 5:34ed652f8c31
- Parent:
- 4:ad9b7355332e
- Child:
- 6:ea6b30c4bb01
Commande Bluetooth test moteur
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| Nanaud | 1:2fe8c402ee79 | 1 | // Nom du fichier : pins.cpp | 
| Nanaud | 0:dc036b67c87c | 2 | #include "pins.h" | 
| Nanaud | 0:dc036b67c87c | 3 | |
| Nanaud | 0:dc036b67c87c | 4 | // Capteurs à ultrasons | 
| Nanaud | 0:dc036b67c87c | 5 | DigitalOut trigger(PB_9); | 
| Nanaud | 0:dc036b67c87c | 6 | InterruptIn echo1(PA_11); | 
| Nanaud | 0:dc036b67c87c | 7 | InterruptIn echo2(PB_12); | 
| Nanaud | 0:dc036b67c87c | 8 | InterruptIn echo3(PB_2); | 
| Nanaud | 0:dc036b67c87c | 9 | InterruptIn echo4(PB_1); | 
| Nanaud | 0:dc036b67c87c | 10 | InterruptIn echo5(PB_15); | 
| Nanaud | 0:dc036b67c87c | 11 | InterruptIn echo6(PB_14); | 
| Nanaud | 0:dc036b67c87c | 12 | |
| Nanaud | 0:dc036b67c87c | 13 | // Drivers DRV8825 | 
| Nanaud | 0:dc036b67c87c | 14 | #define STEP1 PA_6 | 
| Nanaud | 0:dc036b67c87c | 15 | #define STEP2 PB_6 | 
| Nanaud | 0:dc036b67c87c | 16 | #define DIR1 PC_2 | 
| Nanaud | 0:dc036b67c87c | 17 | #define DIR2 PH_1 | 
| Nanaud | 0:dc036b67c87c | 18 | #define EN PC_3 | 
| Nanaud | 5:34ed652f8c31 | 19 | #define diametreRoue 72 //51.45 | 
| Nanaud | 5:34ed652f8c31 | 20 | #define rayonRoue (diametreRoue/2) | 
| Nanaud | 5:34ed652f8c31 | 21 | #define nbPas 6400 //1000 | 
| Nanaud | 4:ad9b7355332e | 22 | BusOut mode(PB_0, PC_1, PC_0); // LSB ... MSB | 
| Nanaud | 5:34ed652f8c31 | 23 | DRV8825 drvGauche(EN,DIR1,STEP1,rayonRoue,nbPas); | 
| Nanaud | 5:34ed652f8c31 | 24 | DRV8825 drvDroite(EN,DIR2,STEP2,rayonRoue,nbPas); | 
| Nanaud | 0:dc036b67c87c | 25 | |
| Nanaud | 1:2fe8c402ee79 | 26 | // Codeurs (Réf : LPJ3806-1000BM-G5-24E) | 
| Nanaud | 1:2fe8c402ee79 | 27 | InterruptIn cdgA(PA_8); // Codeur de gauche | 
| Nanaud | 5:34ed652f8c31 | 28 | DigitalIn cdgB(PA_9); | 
| Nanaud | 1:2fe8c402ee79 | 29 | InterruptIn cddA(PA_0); // Codeur de droite | 
| Nanaud | 5:34ed652f8c31 | 30 | DigitalIn cddB(PA_1); |