Added Back ToF code
Dependencies: QEI2 PID IMU6050Ver11 Watchdog VL53L1X_Filter ros_lib_kinetic
Dependents: Version1-6 Version1-7
Diff: wheelchair.h
- Revision:
- 19:71a6621ee5c3
- Parent:
- 17:7f3b69300bb6
- Child:
- 20:f42db4ae16f0
diff -r 663b6d693252 -r 71a6621ee5c3 wheelchair.h --- a/wheelchair.h Wed Aug 29 16:51:33 2018 +0000 +++ b/wheelchair.h Fri Aug 31 17:09:56 2018 +0000 @@ -13,7 +13,7 @@ #define turn_precision 10 #define def (2.5f/3.3f) #define high 3.3f/3.3f -#define offset .02f +#define offset .0254f #define low (1.7f/3.3f) #define process .1 @@ -42,7 +42,7 @@ /** Create Wheelchair Object with x,y pin for analog dc output * serial for printout, and timer */ - Wheelchair(PinName xPin, PinName yPin, Serial* pc, Timer* time); + Wheelchair(PinName xPin, PinName yPin, Serial* pc, Timer* time, QEI* wheel); /** move using the joystick */ void move(float x_coor, float y_coor); @@ -80,12 +80,14 @@ /* function to get imu data*/ void compass_thread(); void distance_thread(); - void pid_foward(double mm); + void pid_forward(double mm); void pid_reverse(double mm); float getDistance(); void resetDistance(); void pid_turn(int deg); - + void desk(); + void kitchen(); + void desk_to_kitchen(); private: PwmOut* x; PwmOut* y;