mechatronics drive
Dependencies: BNO055_fusion mbed
Fork of DEMO3 by
Diff: drive.h
- Revision:
- 6:59f239c83de4
diff -r c89308dc1827 -r 59f239c83de4 drive.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/drive.h Sun Mar 20 20:32:52 2016 +0000 @@ -0,0 +1,29 @@ +// +// drive.h +// MOTORDRIVER +// +// Created by Antoine Laurens on 15.03.16. +// Copyright (c) 2016 Antoine Laurens. All rights reserved. +// + +#ifndef __MOTORDRIVER__drive__ +#define __MOTORDRIVER__drive__ + +#include <stdio.h> +#include "main.h" +#include "LOCALIZE.h" +void down(LOCALIZE_xya *xya,int stopPoint,float *pwmDuty1,float *pwmDuty2); //when the robot goes downwards + +void driveStraightD(LOCALIZE_xya *xya,int stopPoint,bool dir,float *pwmDuty1,float *pwmDuty2); //when the robot drives straight (forward or backwards) +void driveStraightS(LOCALIZE_xya *xya,int stopPoint,bool dir,float *pwmDuty1,float *pwmDuty2); //D down S Side + +void rotate(int stopAngle,int initAngle,int robPosx,float *pwmDuty1,float *pwmDuty2); //when the robot rotates use *xya instead of init angle and robPosx + +void crossSep(); + +void feedbackControl(LOCALIZE_xya *xya,int line,int angle,float *pwmDuty1,float *pwmDuty2); + + + + +#endif /* defined(__MOTORDRIVER__drive__) */