The servo version of SCRIBE

Dependencies:   BLE_nRF8001 BNO055 HC_SR04_Ultrasonic_Library mbed-rtos mbed

Fork of SCRIBE_stepper by SCRIBE

Committer:
manz
Date:
Thu May 12 06:17:49 2016 +0000
Revision:
14:82248fb06e53
Parent:
11:59a95866416e
latest version;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
manz 11:59a95866416e 1 #include "mbed.h"
manz 11:59a95866416e 2 #include "ultrasonic.h"
manz 11:59a95866416e 3 #include "BNO055.h"
manz 11:59a95866416e 4 #include "stepper.h"
manz 11:59a95866416e 5 #define MMPERSTEP 17
manz 11:59a95866416e 6
manz 11:59a95866416e 7 #define VERTICAL // define it on the vertical version to compile the corresponding code
manz 11:59a95866416e 8
manz 11:59a95866416e 9 class localization
manz 11:59a95866416e 10 {
manz 11:59a95866416e 11 public:
manz 11:59a95866416e 12 /**iniates the class with the specified trigger pin, echo pin, update speed and timeout**/
manz 11:59a95866416e 13 localization();
manz 11:59a95866416e 14 void reset(void); // reset, used at startup
manz 11:59a95866416e 15 /**starts mesuring the distance**/
manz 11:59a95866416e 16 void measure(void); // measure the current position and update X and Y
manz 11:59a95866416e 17 float getAngle(void); //return the angle
manz 11:59a95866416e 18 void servo(int degree);
manz 11:59a95866416e 19 int getX(void); // return X
manz 11:59a95866416e 20 int getY(void); // return Y
manz 11:59a95866416e 21 private:
manz 11:59a95866416e 22 int X;
manz 11:59a95866416e 23 int Y;
manz 11:59a95866416e 24 };