programme ines avce xbee

Dependencies:   MMA8451Q mbed xbee_lib

Fork of Programme_course by Freescale_Cachan

Revision:
0:3ec7fc598e48
diff -r 000000000000 -r 3ec7fc598e48 motor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/motor.h	Thu Jan 26 07:37:45 2017 +0000
@@ -0,0 +1,38 @@
+#ifndef MOTOR_H
+#define MOTOR_H
+#include "MKL25Z4.h"
+#include "mbed.h"
+
+
+#define MOTEUR_A 1
+#define MOTEUR_B 2
+
+#define AVANCER 1
+#define RECULER 2
+#define ATTENTE 3
+
+#define PWM_ANGLE_MILIEU 0              //0.0725-0.0725
+#define PWM_ANGLE_DROIT_MAX 0.02        //0.0925-0.0725
+#define PWM_ANGLE_GAUCHE_MAX 0.02       //0.0525-0.0725
+
+#define ANGLE_DROIT_MAX 30
+#define ANGLE_GAUCHE_MAX 30
+#define FREQ_PWM 5000
+
+#define CORRECTION 1
+
+#define AVANCE 4
+
+
+void PWM_motor (int moteur ,int vitesse);
+void angle_servo_moteur (double angle);
+void motor_init();
+
+extern DigitalOut activate_motor;
+
+extern PwmOut moteurA_avancer;
+extern PwmOut moteurA_reculer;
+extern PwmOut moteurB_avancer;
+extern PwmOut moteurB_reculer;
+extern PwmOut servo;
+#endif //MOTOR_H
\ No newline at end of file