ddd

Dependencies:   a4998ss mbed

Fork of whouse by Keegan Hu

Stepper_motor.h

Committer:
glintligo
Date:
2018-06-03
Revision:
4:d66b6f331b74
Parent:
0:2e00b81c9137

File content as of revision 4:d66b6f331b74:

#ifndef _Stepper_motor_H
#define _Stepper_motor_H
#include "a4988.h"
#include "mbed.h"

class Stepper_motor:public Stepper,public InterruptIn
{
public:
    Stepper_motor(PinName _en,PinName _stepPin,PinName _dirPin,PinName Inter,int _ratio,int _micorstep,int _dir,float _rec=1.8);
    void Config(float rec_rate,float rec);
    void reConfig(float _rec);
    int getDir();
    int pos_dir;
    int neg_dir;
    void Init();
private:
    void set();
    int ratio;
    int microstep;
    int dir;
    float Ori_rec;
};

#endif