ryan lin
/
wheeldriveassistance
wheelchair code for driver assitance
Fork of wheelchairalexa by
Embed:
(wiki syntax)
Show/hide line numbers
wheelchair.h
00001 #ifndef wheelchair 00002 #define wheelchair 00003 #include "mbed.h" 00004 00005 #define turn_precision 10 00006 #define def (2.5f/3.3f) 00007 #define high 3.3f 00008 #define offset .02f 00009 #define low (1.7f/3.3f) 00010 #define process .1 00011 #define xDir D9 00012 #define yDir D10 00013 00014 class Wheelchair 00015 { 00016 public: 00017 Wheelchair(PinName xPin, PinName yPin, Serial* pc, Timer* time); 00018 void move(float x_coor, float y_coor, bool, bool, bool); 00019 double turn_right(int deg); 00020 double turn_left(int deg); 00021 void turn(int deg); 00022 void forward(); 00023 void backward(); 00024 void right(); 00025 void left(); 00026 void stop(); 00027 void compass_thread(); 00028 00029 private: 00030 PwmOut* x; 00031 PwmOut* y; 00032 Serial* out; 00033 Timer* ti; 00034 00035 }; 00036 #endif
Generated on Thu Jul 21 2022 11:57:26 by 1.7.2