for ros

Dependencies:   QEI chair_BNO055 pid ros_lib_kinetic

Dependents:   wheelchaircontrolrealtimeROS

Fork of wheelchaircontrol by ryan lin

wheelchair.h

Committer:
ryanlin97
Date:
2018-07-12
Revision:
1:c0beadca1617
Parent:
0:fc0c4a184482
Child:
3:a5e71bfdb492

File content as of revision 1:c0beadca1617:

#ifndef wheelchair
#define wheelchair

#include "mbed.h"

#define def (2.5f/3.3f)
#define high 3.3f
#define low (1.5f/3.3f)
#define process .1
#define xDir PA_4 //top right two pins
#define yDir D13 //top left two pins

class Wheelchair
{
public:
    Wheelchair(PinName xPin, PinName yPin);
    void move(float degrees);
    void forward();
    void backward();
    void right();
    void left();
    void stop();

private:
    AnalogOut* x;
    AnalogOut* y;

};
#endif