dfd

Dependencies:   stepper mbed

Fork of puma_test by Keegan Hu

Stepper_motor.h

Committer:
glintligo
Date:
2018-05-11
Revision:
3:09f6061e6e5d
Parent:
0:2e00b81c9137

File content as of revision 3:09f6061e6e5d:

#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