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
00001 /* #include */ 00002 #include "pins.h" 00003 00004 DigitalOut Led(LED1); // LED allumée pendant le stand-by 00005 DigitalIn Tirette(PC_8); 00006 InterruptIn BtnBlue(PC_13); 00007 00008 /* Capteurs à ultrasons */ 00009 DigitalOut trigger(PB_9); 00010 InterruptIn echo1(PA_11); 00011 InterruptIn echo2(PB_12); 00012 InterruptIn echo3(PB_2); 00013 InterruptIn echo4(PB_1); 00014 InterruptIn echo5(PB_15); 00015 InterruptIn echo6(PB_14); 00016 00017 /* Drivers DRV8825 */ 00018 #define STEP1 PA_6 00019 #define STEP2 PB_6 00020 #define DIR1 PC_2 00021 #define DIR2 PC_3 00022 #define EN1 PA_15 00023 #define EN2 PA_14 00024 #define diametreRoue 51.45 00025 #define rayonRoue (diametreRoue/2) 00026 #define nbPas 6400 00027 DigitalOut mode_M0(PB_7); 00028 //DigitalOut mode_M1(PC_13); // Inutile 00029 //DigitalOut mode_M2(PC_14); // Hardware 00030 DRV8825 drvGauche(EN1,DIR1,STEP1,rayonRoue,nbPas); 00031 DRV8825 drvDroite(EN2,DIR2,STEP2,rayonRoue,nbPas); 00032 00033 /* Codeurs (Réf : LPJ3806-1000BM-G5-24E) */ 00034 InterruptIn cdgA(PA_8); // Codeur de gauche 00035 DigitalIn cdgB(PA_9); 00036 InterruptIn cddA(PA_0); // Codeur de droite 00037 DigitalIn cddB(PA_1);
Generated on Wed Jul 20 2022 11:03:38 by
1.7.2