mechatronics drive

Dependencies:   BNO055_fusion mbed

Fork of DEMO3 by Edwin Cho

Committer:
alaurens
Date:
Sun Mar 20 20:32:52 2016 +0000
Revision:
6:59f239c83de4
added 3 files drive.h drive.cpp and main.h mains contains constants defined for my other function.; drive.cpp contains 3 function drivestraightS(sideways) driveStraightD(down) and rotate

Who changed what in which revision?

UserRevisionLine numberNew contents of line
alaurens 6:59f239c83de4 1 //
alaurens 6:59f239c83de4 2 // drive.h
alaurens 6:59f239c83de4 3 // MOTORDRIVER
alaurens 6:59f239c83de4 4 //
alaurens 6:59f239c83de4 5 // Created by Antoine Laurens on 15.03.16.
alaurens 6:59f239c83de4 6 // Copyright (c) 2016 Antoine Laurens. All rights reserved.
alaurens 6:59f239c83de4 7 //
alaurens 6:59f239c83de4 8
alaurens 6:59f239c83de4 9 #ifndef __MOTORDRIVER__drive__
alaurens 6:59f239c83de4 10 #define __MOTORDRIVER__drive__
alaurens 6:59f239c83de4 11
alaurens 6:59f239c83de4 12 #include <stdio.h>
alaurens 6:59f239c83de4 13 #include "main.h"
alaurens 6:59f239c83de4 14 #include "LOCALIZE.h"
alaurens 6:59f239c83de4 15 void down(LOCALIZE_xya *xya,int stopPoint,float *pwmDuty1,float *pwmDuty2); //when the robot goes downwards
alaurens 6:59f239c83de4 16
alaurens 6:59f239c83de4 17 void driveStraightD(LOCALIZE_xya *xya,int stopPoint,bool dir,float *pwmDuty1,float *pwmDuty2); //when the robot drives straight (forward or backwards)
alaurens 6:59f239c83de4 18 void driveStraightS(LOCALIZE_xya *xya,int stopPoint,bool dir,float *pwmDuty1,float *pwmDuty2); //D down S Side
alaurens 6:59f239c83de4 19
alaurens 6:59f239c83de4 20 void rotate(int stopAngle,int initAngle,int robPosx,float *pwmDuty1,float *pwmDuty2); //when the robot rotates use *xya instead of init angle and robPosx
alaurens 6:59f239c83de4 21
alaurens 6:59f239c83de4 22 void crossSep();
alaurens 6:59f239c83de4 23
alaurens 6:59f239c83de4 24 void feedbackControl(LOCALIZE_xya *xya,int line,int angle,float *pwmDuty1,float *pwmDuty2);
alaurens 6:59f239c83de4 25
alaurens 6:59f239c83de4 26
alaurens 6:59f239c83de4 27
alaurens 6:59f239c83de4 28
alaurens 6:59f239c83de4 29 #endif /* defined(__MOTORDRIVER__drive__) */