asdf

Dependencies:   stepper mbed

Committer:
Bilybill
Date:
Fri May 11 06:06:10 2018 +0000
Revision:
0:2e00b81c9137
afd

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Bilybill 0:2e00b81c9137 1 #ifndef _Stepper_motor_H
Bilybill 0:2e00b81c9137 2 #define _Stepper_motor_H
Bilybill 0:2e00b81c9137 3 #include "a4988.h"
Bilybill 0:2e00b81c9137 4 #include "mbed.h"
Bilybill 0:2e00b81c9137 5 class Stepper_motor:public Stepper,public InterruptIn
Bilybill 0:2e00b81c9137 6 {
Bilybill 0:2e00b81c9137 7 public:
Bilybill 0:2e00b81c9137 8 Stepper_motor(PinName _en,PinName _stepPin,PinName _dirPin,PinName Inter,int _ratio,int _micorstep,int _dir,float _rec=1.8);
Bilybill 0:2e00b81c9137 9 void Config(float rec_rate,float rec);
Bilybill 0:2e00b81c9137 10 void reConfig(float _rec);
Bilybill 0:2e00b81c9137 11 int getDir();
Bilybill 0:2e00b81c9137 12 int pos_dir;
Bilybill 0:2e00b81c9137 13 int neg_dir;
Bilybill 0:2e00b81c9137 14 void Init();
Bilybill 0:2e00b81c9137 15 private:
Bilybill 0:2e00b81c9137 16 void set();
Bilybill 0:2e00b81c9137 17 int ratio;
Bilybill 0:2e00b81c9137 18 int microstep;
Bilybill 0:2e00b81c9137 19 int dir;
Bilybill 0:2e00b81c9137 20 float Ori_rec;
Bilybill 0:2e00b81c9137 21 };
Bilybill 0:2e00b81c9137 22
Bilybill 0:2e00b81c9137 23 #endif