dfd

Dependencies:   stepper mbed

Fork of puma_test by Keegan Hu

Revision:
0:2e00b81c9137
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Stepper_motor.h	Fri May 11 06:06:10 2018 +0000
@@ -0,0 +1,23 @@
+#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
\ No newline at end of file