asdf

Dependencies:   stepper mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Stepper_motor.h Source File

Stepper_motor.h

00001 #ifndef _Stepper_motor_H
00002 #define _Stepper_motor_H
00003 #include "a4988.h"
00004 #include "mbed.h"
00005 class Stepper_motor:public Stepper,public InterruptIn
00006 {
00007 public:
00008     Stepper_motor(PinName _en,PinName _stepPin,PinName _dirPin,PinName Inter,int _ratio,int _micorstep,int _dir,float _rec=1.8);
00009     void Config(float rec_rate,float rec);
00010     void reConfig(float _rec);
00011     int getDir();
00012     int pos_dir;
00013     int neg_dir;
00014     void Init();
00015 private:
00016     void set();
00017     int ratio;
00018     int microstep;
00019     int dir;
00020     float Ori_rec;
00021 };
00022 
00023 #endif