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.
Diff: pins.cpp
- Revision:
- 22:f891c2bce091
- Parent:
- 20:7d206773f39e
- Child:
- 26:bb2b778bd351
--- a/pins.cpp Sun Oct 25 22:36:51 2020 +0000 +++ b/pins.cpp Tue Oct 27 17:27:33 2020 +0000 @@ -1,11 +1,11 @@ -// Nom du fichier : pins.cpp +/* #include */ #include "pins.h" -InterruptIn btn(PC_13); -//DigitalOut myled(LED2); -//DigitalIn cordon(PC_8); +DigitalOut Led(LED1); // LED allumée pendant le stand-by +DigitalIn Tirette(PC_8); +InterruptIn BtnBlue(PC_13); -// Capteurs à ultrasons +/* Capteurs à ultrasons */ DigitalOut trigger(PB_9); InterruptIn echo1(PA_11); InterruptIn echo2(PB_12); @@ -14,7 +14,7 @@ InterruptIn echo5(PB_15); InterruptIn echo6(PB_14); -// Drivers DRV8825 +/* Drivers DRV8825 */ #define STEP1 PA_6 #define STEP2 PB_6 #define DIR1 PC_2 @@ -23,15 +23,14 @@ #define EN2 PA_14 #define diametreRoue 51.45 #define rayonRoue (diametreRoue/2) -#define nbPas 6400 //1000 -//BusOut mode(PB_7, PC_13, PC_14); // LSB ... MSB +#define nbPas 6400 DigitalOut mode_M0(PB_7); //DigitalOut mode_M1(PC_13); // Inutile //DigitalOut mode_M2(PC_14); // Hardware -DRV8825 drvGauche(EN1,DIR1,STEP1,rayonRoue,nbPas); -DRV8825 drvDroite(EN2,DIR2,STEP2,rayonRoue,nbPas); +DRV8825 drvGauche(EN1,DIR1,STEP1,rayonRoue,nbPas); +DRV8825 drvDroite(EN2,DIR2,STEP2,rayonRoue,nbPas); -// Codeurs (Réf : LPJ3806-1000BM-G5-24E) +/* Codeurs (Réf : LPJ3806-1000BM-G5-24E) */ InterruptIn cdgA(PA_8); // Codeur de gauche DigitalIn cdgB(PA_9); InterruptIn cddA(PA_0); // Codeur de droite