added code for PCB on and off, added pointers to e_button and pwm pins
Dependencies: QEI2 chair_BNO055 PID VL53L1X_Filter
Dependents: wheelchairControlSumer2019
Diff: wheelchair.h
- Revision:
- 3:a5e71bfdb492
- Parent:
- 1:c0beadca1617
- Child:
- 5:e0ccaab3959a
diff -r c2d049efc266 -r a5e71bfdb492 wheelchair.h --- a/wheelchair.h Thu Jul 12 20:51:54 2018 +0000 +++ b/wheelchair.h Mon Jul 16 20:46:42 2018 +0000 @@ -2,19 +2,21 @@ #define wheelchair #include "mbed.h" +#include "math.h" #define def (2.5f/3.3f) #define high 3.3f -#define low (1.5f/3.3f) +#define offset .02f +#define low (1.7f/3.3f) #define process .1 -#define xDir PA_4 //top right two pins +#define xDir D12 //top right two pins #define yDir D13 //top left two pins class Wheelchair { public: Wheelchair(PinName xPin, PinName yPin); - void move(float degrees); + void move(float x_coor, float y_coor); void forward(); void backward(); void right(); @@ -22,8 +24,8 @@ void stop(); private: - AnalogOut* x; - AnalogOut* y; + PwmOut* x; + PwmOut* y; }; #endif \ No newline at end of file