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: PID QEI chair_BNO055 ros_lib_kinetic
Fork of wheelchaircontrol by
Diff: wheelchair.h
- Revision:
- 17:7f3b69300bb6
- Parent:
- 16:b403082eeacd
- Child:
- 19:71a6621ee5c3
--- a/wheelchair.h Mon Aug 13 21:54:31 2018 +0000
+++ b/wheelchair.h Tue Aug 28 23:24:08 2018 +0000
@@ -2,10 +2,11 @@
#define wheelchair
#include "chair_BNO055.h"
-#include "PID_v1.h"
+#include "PID.h"
#include "QEI.h"
#include <ros.h>
#include <geometry_msgs/Twist.h>
+//#include "BufferedSerial.h"
//#include "chair_MPU9250.h"
@@ -34,6 +35,7 @@
/** Wheelchair class
* Used for controlling the smart wheelchair
*/
+
class Wheelchair
{
public:
@@ -77,6 +79,9 @@
/* function to get imu data*/
void compass_thread();
+ void distance_thread();
+ void pid_foward(double mm);
+ void pid_reverse(double mm);
float getDistance();
void resetDistance();
void pid_turn(int deg);
@@ -86,6 +91,7 @@
PwmOut* y;
chair_BNO055* imu;
Serial* out;
+ Timer* tim;
Timer* ti;
QEI* wheel;
