Small class to control a stepper motor

Dependents:   tuner

Motor.h

Committer:
melangeaddict
Date:
2012-11-25
Revision:
0:278f07b2be46

File content as of revision 0:278f07b2be46:

#pragma once
#include "mbed.h"
#include "string.h"

using namespace std;

class Motor {

public:

    Motor(PinName enable,PinName direction,PinName step);
    ~Motor();

    void motor_turn(int, int);

private:
    DigitalOut _enable;
    DigitalOut _direction;
    PwmOut _step;
};