Voili voilou
Dependencies: RoboClaw StepperMotor mbed
Fork of Robot2016_2-0 by
Map/defines.h@41:b5a2fbc20beb, 2016-04-13 (annotated)
- Committer:
- sype
- Date:
- Wed Apr 13 11:27:34 2016 +0000
- Revision:
- 41:b5a2fbc20beb
- Parent:
- 39:309f38d1e49c
Impl?mentation des dispositifs du robot
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
IceTeam | 12:5355aed288b0 | 1 | #ifndef DEFINE_H |
IceTeam | 12:5355aed288b0 | 2 | #define DEFINE_H |
IceTeam | 12:5355aed288b0 | 3 | |
IceTeam | 12:5355aed288b0 | 4 | #define PLAN_B |
IceTeam | 12:5355aed288b0 | 5 | //#define OUT_USB |
IceTeam | 12:5355aed288b0 | 6 | |
IceTeam | 12:5355aed288b0 | 7 | |
IceTeam | 12:5355aed288b0 | 8 | enum ID |
IceTeam | 12:5355aed288b0 | 9 | { |
IceTeam | 12:5355aed288b0 | 10 | IDO_MG, |
IceTeam | 12:5355aed288b0 | 11 | IDO_MH, |
IceTeam | 12:5355aed288b0 | 12 | IDO_MD, |
IceTeam | 12:5355aed288b0 | 13 | IDO_MB, |
IceTeam | 12:5355aed288b0 | 14 | IDO_M1, |
IceTeam | 12:5355aed288b0 | 15 | IDO_M2, |
IceTeam | 12:5355aed288b0 | 16 | IDO_M3, |
IceTeam | 12:5355aed288b0 | 17 | IDO_M4, |
IceTeam | 12:5355aed288b0 | 18 | IDO_M5, |
IceTeam | 12:5355aed288b0 | 19 | IDO_M6, |
IceTeam | 12:5355aed288b0 | 20 | IDO_D1, |
IceTeam | 12:5355aed288b0 | 21 | IDO_D2, |
IceTeam | 12:5355aed288b0 | 22 | IDO_D3, |
IceTeam | 12:5355aed288b0 | 23 | IDO_D4, |
IceTeam | 12:5355aed288b0 | 24 | IDO_E, |
IceTeam | 12:5355aed288b0 | 25 | IDO_S, |
IceTeam | 12:5355aed288b0 | 26 | IDO_PC1, |
IceTeam | 12:5355aed288b0 | 27 | IDO_PC2, |
IceTeam | 12:5355aed288b0 | 28 | IDO_PC3, |
IceTeam | 12:5355aed288b0 | 29 | IDO_PC4, |
IceTeam | 12:5355aed288b0 | 30 | IDO_PC5, |
IceTeam | 12:5355aed288b0 | 31 | IDO_P1, |
IceTeam | 12:5355aed288b0 | 32 | IDO_P2, |
IceTeam | 12:5355aed288b0 | 33 | IDO_P3, |
IceTeam | 12:5355aed288b0 | 34 | IDO_P4, |
IceTeam | 12:5355aed288b0 | 35 | IDO_P5, |
IceTeam | 12:5355aed288b0 | 36 | IDO_P6, |
IceTeam | 12:5355aed288b0 | 37 | IDO_P7, |
IceTeam | 12:5355aed288b0 | 38 | IDO_P8, |
IceTeam | 12:5355aed288b0 | 39 | IDO_P9, |
IceTeam | 12:5355aed288b0 | 40 | IDO_P10, |
IceTeam | 12:5355aed288b0 | 41 | IDO_P11, |
IceTeam | 12:5355aed288b0 | 42 | IDO_P12, |
IceTeam | 12:5355aed288b0 | 43 | IDO_P13, |
IceTeam | 12:5355aed288b0 | 44 | IDO_P14, |
IceTeam | 12:5355aed288b0 | 45 | IDO_P15, |
IceTeam | 12:5355aed288b0 | 46 | IDO_P16, |
IceTeam | 12:5355aed288b0 | 47 | IDO_DEPOT_PC, |
IceTeam | 12:5355aed288b0 | 48 | IDO_DEPOT_P |
IceTeam | 12:5355aed288b0 | 49 | }; |
IceTeam | 12:5355aed288b0 | 50 | |
IceTeam | 39:309f38d1e49c | 51 | #define ROBOTRADIUS 150 |
IceTeam | 12:5355aed288b0 | 52 | |
IceTeam | 12:5355aed288b0 | 53 | #define MAXPOINT 8000 |
IceTeam | 12:5355aed288b0 | 54 | |
IceTeam | 12:5355aed288b0 | 55 | // ----- Loggeur ----- // |
IceTeam | 12:5355aed288b0 | 56 | |
IceTeam | 12:5355aed288b0 | 57 | #ifdef OUT_USB |
IceTeam | 12:5355aed288b0 | 58 | #define OUT_TX USBTX |
IceTeam | 12:5355aed288b0 | 59 | #define OUT_RX USBRX |
IceTeam | 12:5355aed288b0 | 60 | #else |
IceTeam | 12:5355aed288b0 | 61 | #define OUT_TX PA_11 |
IceTeam | 12:5355aed288b0 | 62 | #define OUT_RX PA_12 |
IceTeam | 12:5355aed288b0 | 63 | #endif |
IceTeam | 12:5355aed288b0 | 64 | |
IceTeam | 12:5355aed288b0 | 65 | // ----- Moteurs ----- // |
IceTeam | 12:5355aed288b0 | 66 | |
IceTeam | 12:5355aed288b0 | 67 | #define PWM_MOT1 PB_13 |
IceTeam | 12:5355aed288b0 | 68 | #define PWM_MOT2 PB_14 |
IceTeam | 12:5355aed288b0 | 69 | #define PWM_MOT3 PB_15 |
IceTeam | 12:5355aed288b0 | 70 | |
IceTeam | 12:5355aed288b0 | 71 | #define DIR_MOT1 PC_9 |
IceTeam | 12:5355aed288b0 | 72 | #define DIR_MOT2 PB_8 |
IceTeam | 12:5355aed288b0 | 73 | #define DIR_MOT3 PB_9 |
IceTeam | 12:5355aed288b0 | 74 | |
IceTeam | 12:5355aed288b0 | 75 | // ----- Odometrie ----- // |
IceTeam | 12:5355aed288b0 | 76 | |
IceTeam | 12:5355aed288b0 | 77 | #define ODO_G_B PA_10 |
IceTeam | 12:5355aed288b0 | 78 | #define ODO_G_A PB_3 |
IceTeam | 12:5355aed288b0 | 79 | |
IceTeam | 12:5355aed288b0 | 80 | #define ODO_D_B PB_5 |
IceTeam | 12:5355aed288b0 | 81 | #define ODO_D_A PB_4 |
IceTeam | 12:5355aed288b0 | 82 | |
IceTeam | 12:5355aed288b0 | 83 | // ----- Boutons ----- // |
IceTeam | 12:5355aed288b0 | 84 | |
IceTeam | 12:5355aed288b0 | 85 | #define LED_DESSUS PH_1 |
IceTeam | 12:5355aed288b0 | 86 | #define BP_DESSUS PC_8 |
IceTeam | 12:5355aed288b0 | 87 | #define TIRETTE_DESSUS PC_6 |
IceTeam | 12:5355aed288b0 | 88 | #define COULEUR_DESSUS PC_5 |
IceTeam | 12:5355aed288b0 | 89 | |
IceTeam | 12:5355aed288b0 | 90 | #define COULEUR_JAUNE 0 |
IceTeam | 12:5355aed288b0 | 91 | #define COULEUR_VERTE 1 |
IceTeam | 12:5355aed288b0 | 92 | |
IceTeam | 12:5355aed288b0 | 93 | // ----- AX12 ----- // |
IceTeam | 12:5355aed288b0 | 94 | |
IceTeam | 12:5355aed288b0 | 95 | #define AX12_TX PA_9 |
IceTeam | 12:5355aed288b0 | 96 | #define AX12_RX NC |
IceTeam | 12:5355aed288b0 | 97 | |
IceTeam | 12:5355aed288b0 | 98 | #define MAX_TORQUE 300 |
IceTeam | 12:5355aed288b0 | 99 | |
IceTeam | 12:5355aed288b0 | 100 | #define BRASG_OUVERT 60 |
IceTeam | 12:5355aed288b0 | 101 | #define BRASG_FERME 155 |
IceTeam | 12:5355aed288b0 | 102 | #define BRASD_OUVERT 240 |
IceTeam | 12:5355aed288b0 | 103 | #define BRASD_FERME 145 |
IceTeam | 12:5355aed288b0 | 104 | |
IceTeam | 12:5355aed288b0 | 105 | #define PINCE_OUVERTE 100 |
IceTeam | 12:5355aed288b0 | 106 | #define PINCE_FERMEE 3 |
IceTeam | 12:5355aed288b0 | 107 | |
IceTeam | 12:5355aed288b0 | 108 | // ----- Sharp ----- // |
IceTeam | 12:5355aed288b0 | 109 | |
IceTeam | 12:5355aed288b0 | 110 | #define SHARP_D A4 |
IceTeam | 12:5355aed288b0 | 111 | #define SHARP_DG A3 |
IceTeam | 12:5355aed288b0 | 112 | #define SHARP_DD A5 |
IceTeam | 12:5355aed288b0 | 113 | #define SHARP_AG A2 |
IceTeam | 12:5355aed288b0 | 114 | #define SHARP_AD A1 |
IceTeam | 12:5355aed288b0 | 115 | |
IceTeam | 12:5355aed288b0 | 116 | #endif |