Inverted Pendulum / Mbed 2 deprecated IP-Interface

Dependencies:   mbed QEI

Motor/Motor.h

Committer:
dlweakley
Date:
2016-11-18
Revision:
22:c18f04d1dc49
Parent:
8:2abfdbf5a3b8
Child:
23:5238b046119b

File content as of revision 22:c18f04d1dc49:

#ifndef MBED_MOTOR_H
#define MBED_MOTOR_H
 
#include "mbed.h"
 
class Motor {
public:
   Motor(PinName _M1PWM, PinName _M2PWM, PinName _M1DIR, PinName _M2DIR, PinName _D2, int default_wait);
    void clockwise();
    void anticlockwise();
    void clockwise(int wait);
    void anticlockwise(int wait);
    void step_clockwise(int steps);
    void step_anticlockwise(int steps);
    void step_anticlockwise(int steps, int wait);
    void step_clockwise(int steps, int wait);
    void run (bool t);
    
    int wait;
    bool dir; 
private:  
    DigitalOut M1PWM;
    DigitalOut M2PWM;
    DigitalOut M1DIR;
    DigitalOut M2DIR;
    DigitalOut D2;
    
    
};
 
#endif