![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
The servo version of SCRIBE
Dependencies: BLE_nRF8001 BNO055 HC_SR04_Ultrasonic_Library mbed-rtos mbed
Fork of SCRIBE_stepper by
Diff: localization.h
- Revision:
- 11:59a95866416e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization.h Thu May 05 22:01:18 2016 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "ultrasonic.h" +#include "BNO055.h" +#include "stepper.h" +#define MMPERSTEP 17 + +#define VERTICAL // define it on the vertical version to compile the corresponding code + +class localization +{ + public: + /**iniates the class with the specified trigger pin, echo pin, update speed and timeout**/ + localization(); + void reset(void); // reset, used at startup + /**starts mesuring the distance**/ + void measure(void); // measure the current position and update X and Y + float getAngle(void); //return the angle + void servo(int degree); + int getX(void); // return X + int getY(void); // return Y + private: + int X; + int Y; +}; \ No newline at end of file