programme ines avce xbee

Dependencies:   MMA8451Q mbed xbee_lib

Fork of Programme_course by Freescale_Cachan

motor.h

Committer:
Freescale_cup
Date:
2017-01-26
Revision:
0:3ec7fc598e48

File content as of revision 0:3ec7fc598e48:

#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