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