ddd

Dependencies:   a4998ss mbed

Fork of whouse by Keegan Hu

Committer:
glintligo
Date:
Sun Jun 03 10:18:11 2018 +0000
Revision:
4:d66b6f331b74
Parent:
0:2e00b81c9137
ddd

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"
glintligo 4:d66b6f331b74 5
Bilybill 0:2e00b81c9137 6 class Stepper_motor:public Stepper,public InterruptIn
Bilybill 0:2e00b81c9137 7 {
Bilybill 0:2e00b81c9137 8 public:
Bilybill 0:2e00b81c9137 9 Stepper_motor(PinName _en,PinName _stepPin,PinName _dirPin,PinName Inter,int _ratio,int _micorstep,int _dir,float _rec=1.8);
Bilybill 0:2e00b81c9137 10 void Config(float rec_rate,float rec);
Bilybill 0:2e00b81c9137 11 void reConfig(float _rec);
Bilybill 0:2e00b81c9137 12 int getDir();
Bilybill 0:2e00b81c9137 13 int pos_dir;
Bilybill 0:2e00b81c9137 14 int neg_dir;
Bilybill 0:2e00b81c9137 15 void Init();
Bilybill 0:2e00b81c9137 16 private:
Bilybill 0:2e00b81c9137 17 void set();
Bilybill 0:2e00b81c9137 18 int ratio;
Bilybill 0:2e00b81c9137 19 int microstep;
Bilybill 0:2e00b81c9137 20 int dir;
Bilybill 0:2e00b81c9137 21 float Ori_rec;
Bilybill 0:2e00b81c9137 22 };
Bilybill 0:2e00b81c9137 23
Bilybill 0:2e00b81c9137 24 #endif