Robot's source code

Dependencies:   mbed

Committer:
Jagang
Date:
Mon May 11 20:32:11 2015 +0000
Revision:
123:55e5e9acc541
Parent:
119:c45efcd706d9
Maj AI; Repositionnement du d?part (1000,177); Ajout de l'action sur les claps

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jagang 109:53918ba98306 1 #ifndef DEFINE_H
Jagang 109:53918ba98306 2 #define DEFINE_H
Jagang 109:53918ba98306 3
Jagang 109:53918ba98306 4 #define PLAN_B
Jagang 123:55e5e9acc541 5 //#define OUT_USB
Jagang 123:55e5e9acc541 6
Jagang 123:55e5e9acc541 7
Jagang 123:55e5e9acc541 8 enum ID
Jagang 123:55e5e9acc541 9 {
Jagang 123:55e5e9acc541 10 IDO_MG,
Jagang 123:55e5e9acc541 11 IDO_MH,
Jagang 123:55e5e9acc541 12 IDO_MD,
Jagang 123:55e5e9acc541 13 IDO_MB,
Jagang 123:55e5e9acc541 14 IDO_M1,
Jagang 123:55e5e9acc541 15 IDO_M2,
Jagang 123:55e5e9acc541 16 IDO_M3,
Jagang 123:55e5e9acc541 17 IDO_M4,
Jagang 123:55e5e9acc541 18 IDO_M5,
Jagang 123:55e5e9acc541 19 IDO_M6,
Jagang 123:55e5e9acc541 20 IDO_D1,
Jagang 123:55e5e9acc541 21 IDO_D2,
Jagang 123:55e5e9acc541 22 IDO_D3,
Jagang 123:55e5e9acc541 23 IDO_D4,
Jagang 123:55e5e9acc541 24 IDO_E,
Jagang 123:55e5e9acc541 25 IDO_S,
Jagang 123:55e5e9acc541 26 IDO_PC1,
Jagang 123:55e5e9acc541 27 IDO_PC2,
Jagang 123:55e5e9acc541 28 IDO_PC3,
Jagang 123:55e5e9acc541 29 IDO_PC4,
Jagang 123:55e5e9acc541 30 IDO_PC5,
Jagang 123:55e5e9acc541 31 IDO_P1,
Jagang 123:55e5e9acc541 32 IDO_P2,
Jagang 123:55e5e9acc541 33 IDO_P3,
Jagang 123:55e5e9acc541 34 IDO_P4,
Jagang 123:55e5e9acc541 35 IDO_P5,
Jagang 123:55e5e9acc541 36 IDO_P6,
Jagang 123:55e5e9acc541 37 IDO_P7,
Jagang 123:55e5e9acc541 38 IDO_P8,
Jagang 123:55e5e9acc541 39 IDO_P9,
Jagang 123:55e5e9acc541 40 IDO_P10,
Jagang 123:55e5e9acc541 41 IDO_P11,
Jagang 123:55e5e9acc541 42 IDO_P12,
Jagang 123:55e5e9acc541 43 IDO_P13,
Jagang 123:55e5e9acc541 44 IDO_P14,
Jagang 123:55e5e9acc541 45 IDO_P15,
Jagang 123:55e5e9acc541 46 IDO_P16,
Jagang 123:55e5e9acc541 47 IDO_DEPOT_PC,
Jagang 123:55e5e9acc541 48 IDO_DEPOT_P
Jagang 123:55e5e9acc541 49 };
Jagang 109:53918ba98306 50
Jagang 109:53918ba98306 51 #define ROBOTRADIUS 190
Jagang 109:53918ba98306 52
Jagang 119:c45efcd706d9 53 #define MAXPOINT 8000
Jagang 117:f8c147141a0c 54
Jagang 93:4d5664e9188a 55 // ----- Loggeur ----- //
Jagang 39:09c04fd42c94 56
Jagang 39:09c04fd42c94 57 #ifdef OUT_USB
Jagang 39:09c04fd42c94 58 #define OUT_TX USBTX
Jagang 39:09c04fd42c94 59 #define OUT_RX USBRX
Jagang 39:09c04fd42c94 60 #else
Jagang 39:09c04fd42c94 61 #define OUT_TX PA_11
Jagang 39:09c04fd42c94 62 #define OUT_RX PA_12
Jagang 39:09c04fd42c94 63 #endif
Jagang 39:09c04fd42c94 64
Jagang 93:4d5664e9188a 65 // ----- Moteurs ----- //
Jagang 93:4d5664e9188a 66
Jagang 40:83ce8d1072ef 67 #define PWM_MOT1 PB_13
Jagang 40:83ce8d1072ef 68 #define PWM_MOT2 PB_14
Jagang 40:83ce8d1072ef 69 #define PWM_MOT3 PB_15
Jagang 40:83ce8d1072ef 70
Jagang 40:83ce8d1072ef 71 #define DIR_MOT1 PC_9
Jagang 40:83ce8d1072ef 72 #define DIR_MOT2 PB_8
Jagang 40:83ce8d1072ef 73 #define DIR_MOT3 PB_9
Jagang 39:09c04fd42c94 74
Jagang 93:4d5664e9188a 75 // ----- Odometrie ----- //
Jagang 71:95d76c181b22 76
Jagang 71:95d76c181b22 77 #define ODO_G_B PA_10
Jagang 71:95d76c181b22 78 #define ODO_G_A PB_3
Jagang 71:95d76c181b22 79
Jagang 71:95d76c181b22 80 #define ODO_D_B PB_5
Jagang 71:95d76c181b22 81 #define ODO_D_A PB_4
Jagang 71:95d76c181b22 82
Jagang 93:4d5664e9188a 83 #define PI 3.14159f
Jagang 93:4d5664e9188a 84
Jagang 93:4d5664e9188a 85 // ----- Boutons ----- //
Jagang 93:4d5664e9188a 86
Jagang 93:4d5664e9188a 87 #define LED_DESSUS PH_1
Jagang 93:4d5664e9188a 88 #define BP_DESSUS PC_8
Jagang 93:4d5664e9188a 89 #define TIRETTE_DESSUS PC_6
Jagang 93:4d5664e9188a 90 #define COULEUR_DESSUS PC_5
Jagang 93:4d5664e9188a 91
Jagang 109:53918ba98306 92 #define COULEUR_JAUNE 0
Jagang 109:53918ba98306 93 #define COULEUR_VERTE 1
Jagang 109:53918ba98306 94
Jagang 93:4d5664e9188a 95 // ----- AX12 ----- //
Jagang 71:95d76c181b22 96
Jagang 78:7c7cefbe1772 97 #define AX12_TX PA_9
Jagang 78:7c7cefbe1772 98 #define AX12_RX NC
Jagang 78:7c7cefbe1772 99
Jagang 93:4d5664e9188a 100 #define MAX_TORQUE 300
Jagang 93:4d5664e9188a 101
Jagang 93:4d5664e9188a 102 #define BRASG_OUVERT 60
Jagang 93:4d5664e9188a 103 #define BRASG_FERME 155
Jagang 93:4d5664e9188a 104 #define BRASD_OUVERT 240
Jagang 93:4d5664e9188a 105 #define BRASD_FERME 145
Jagang 93:4d5664e9188a 106
Jagang 93:4d5664e9188a 107 #define PINCE_OUVERTE 100
Jagang 93:4d5664e9188a 108 #define PINCE_FERMEE 3
Jagang 93:4d5664e9188a 109
Jagang 93:4d5664e9188a 110 // ----- Sharp ----- //
Jagang 93:4d5664e9188a 111
Jagang 93:4d5664e9188a 112 #define SHARP_D A4
Jagang 93:4d5664e9188a 113 #define SHARP_DG A3
Jagang 93:4d5664e9188a 114 #define SHARP_DD A5
Jagang 93:4d5664e9188a 115 #define SHARP_AG A2
Jagang 93:4d5664e9188a 116 #define SHARP_AD A1
Jagang 93:4d5664e9188a 117
Jagang 109:53918ba98306 118 #endif