wheelchair code for driver assitance

Dependencies:   mbed

Fork of wheelchairalexa by ryan lin

Revision:
11:75f0f13ff6c1
Parent:
10:e5463c11e0a0
Child:
12:0e5a0571b497
--- a/wheelchair.h	Mon Jul 23 20:17:37 2018 +0000
+++ b/wheelchair.h	Thu Aug 16 16:42:45 2018 +0000
@@ -1,36 +1,36 @@
 #ifndef wheelchair
 #define wheelchair
+#include "mbed.h"
 
-//#include "chair_BNO055.h"
-#include "chair_MPU9250.h"
-
+#define turn_precision 10
 #define def (2.5f/3.3f)
 #define high 3.3f
 #define offset .02f
 #define low (1.7f/3.3f)
 #define process .1
-#define xDir D12 //top right two pins
-#define yDir D13 //top left two pins
+#define xDir D9
+#define yDir D10
 
 class Wheelchair
 {
 public:
     Wheelchair(PinName xPin, PinName yPin, Serial* pc, Timer* time);
     void move(float x_coor, float y_coor);
-    void turn_right();
-    void turn_left();
+    double turn_right(int deg);
+    double turn_left(int deg);
+    void turn(int deg);
     void forward();
     void backward();
     void right();
     void left();
     void stop();
+    void compass_thread();
 
 private:
     PwmOut* x;
     PwmOut* y;
-    //chair_BNO055* imu;
-    chair_MPU9250* imu;
     Serial* out;
+    Timer* ti;
 
 };
 #endif
\ No newline at end of file