ryan lin
/
wheeldriveassistance
wheelchair code for driver assitance
Fork of wheelchairalexa by
wheelchair.h
- Committer:
- ryanlin97
- Date:
- 2018-07-16
- Revision:
- 3:a5e71bfdb492
- Parent:
- 1:c0beadca1617
- Child:
- 5:e0ccaab3959a
File content as of revision 3:a5e71bfdb492:
#ifndef wheelchair #define wheelchair #include "mbed.h" #include "math.h" #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 class Wheelchair { public: Wheelchair(PinName xPin, PinName yPin); void move(float x_coor, float y_coor); void forward(); void backward(); void right(); void left(); void stop(); private: PwmOut* x; PwmOut* y; }; #endif