Robot's source code

Dependencies:   mbed

Committer:
Jagang
Date:
Tue May 05 16:35:53 2015 +0000
Revision:
109:53918ba98306
Parent:
93:4d5664e9188a
Child:
117:f8c147141a0c
IA

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 109:53918ba98306 5 #define OUT_USB
Jagang 109:53918ba98306 6
Jagang 109:53918ba98306 7 #define ROBOTRADIUS 190
Jagang 109:53918ba98306 8
Jagang 93:4d5664e9188a 9 // ----- Loggeur ----- //
Jagang 39:09c04fd42c94 10
Jagang 39:09c04fd42c94 11 #ifdef OUT_USB
Jagang 39:09c04fd42c94 12 #define OUT_TX USBTX
Jagang 39:09c04fd42c94 13 #define OUT_RX USBRX
Jagang 39:09c04fd42c94 14 #else
Jagang 39:09c04fd42c94 15 #define OUT_TX PA_11
Jagang 39:09c04fd42c94 16 #define OUT_RX PA_12
Jagang 39:09c04fd42c94 17 #endif
Jagang 39:09c04fd42c94 18
Jagang 93:4d5664e9188a 19 // ----- Moteurs ----- //
Jagang 93:4d5664e9188a 20
Jagang 40:83ce8d1072ef 21 #define PWM_MOT1 PB_13
Jagang 40:83ce8d1072ef 22 #define PWM_MOT2 PB_14
Jagang 40:83ce8d1072ef 23 #define PWM_MOT3 PB_15
Jagang 40:83ce8d1072ef 24
Jagang 40:83ce8d1072ef 25 #define DIR_MOT1 PC_9
Jagang 40:83ce8d1072ef 26 #define DIR_MOT2 PB_8
Jagang 40:83ce8d1072ef 27 #define DIR_MOT3 PB_9
Jagang 39:09c04fd42c94 28
Jagang 93:4d5664e9188a 29 // ----- Odometrie ----- //
Jagang 71:95d76c181b22 30
Jagang 71:95d76c181b22 31 #define ODO_G_B PA_10
Jagang 71:95d76c181b22 32 #define ODO_G_A PB_3
Jagang 71:95d76c181b22 33
Jagang 71:95d76c181b22 34 #define ODO_D_B PB_5
Jagang 71:95d76c181b22 35 #define ODO_D_A PB_4
Jagang 71:95d76c181b22 36
Jagang 93:4d5664e9188a 37 #define PI 3.14159f
Jagang 93:4d5664e9188a 38
Jagang 93:4d5664e9188a 39 // ----- Boutons ----- //
Jagang 93:4d5664e9188a 40
Jagang 93:4d5664e9188a 41 #define LED_DESSUS PH_1
Jagang 93:4d5664e9188a 42 #define BP_DESSUS PC_8
Jagang 93:4d5664e9188a 43 #define TIRETTE_DESSUS PC_6
Jagang 93:4d5664e9188a 44 #define COULEUR_DESSUS PC_5
Jagang 93:4d5664e9188a 45
Jagang 109:53918ba98306 46 #define COULEUR_JAUNE 0
Jagang 109:53918ba98306 47 #define COULEUR_VERTE 1
Jagang 109:53918ba98306 48
Jagang 93:4d5664e9188a 49 // ----- AX12 ----- //
Jagang 71:95d76c181b22 50
Jagang 78:7c7cefbe1772 51 #define AX12_TX PA_9
Jagang 78:7c7cefbe1772 52 #define AX12_RX NC
Jagang 78:7c7cefbe1772 53
Jagang 93:4d5664e9188a 54 #define MAX_TORQUE 300
Jagang 93:4d5664e9188a 55
Jagang 93:4d5664e9188a 56 #define BRASG_OUVERT 60
Jagang 93:4d5664e9188a 57 #define BRASG_FERME 155
Jagang 93:4d5664e9188a 58 #define BRASD_OUVERT 240
Jagang 93:4d5664e9188a 59 #define BRASD_FERME 145
Jagang 93:4d5664e9188a 60
Jagang 93:4d5664e9188a 61 #define PINCE_OUVERTE 100
Jagang 93:4d5664e9188a 62 #define PINCE_FERMEE 3
Jagang 93:4d5664e9188a 63
Jagang 93:4d5664e9188a 64 // ----- Sharp ----- //
Jagang 93:4d5664e9188a 65
Jagang 93:4d5664e9188a 66 #define SHARP_D A4
Jagang 93:4d5664e9188a 67 #define SHARP_DG A3
Jagang 93:4d5664e9188a 68 #define SHARP_DD A5
Jagang 93:4d5664e9188a 69 #define SHARP_AG A2
Jagang 93:4d5664e9188a 70 #define SHARP_AD A1
Jagang 93:4d5664e9188a 71
Jagang 109:53918ba98306 72 #endif