Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: QEI2 PID VL53L1X_Filter
Diff: wheelchair.h
- Revision:
- 11:d14a1f7f1297
- Parent:
- 10:e5463c11e0a0
- Child:
- 12:921488918749
diff -r e5463c11e0a0 -r d14a1f7f1297 wheelchair.h
--- a/wheelchair.h Mon Jul 23 20:17:37 2018 +0000
+++ b/wheelchair.h Wed Aug 01 22:39:22 2018 +0000
@@ -1,9 +1,10 @@
#ifndef wheelchair
#define wheelchair
-//#include "chair_BNO055.h"
-#include "chair_MPU9250.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
@@ -17,20 +18,24 @@
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();
+ chair_BNO055* imu;
private:
PwmOut* x;
PwmOut* y;
//chair_BNO055* imu;
- chair_MPU9250* imu;
+ //chair_MPU9250* imu;
Serial* out;
+ Timer* ti;
};
#endif
\ No newline at end of file