a easy way to control stepper

Dependents:   Ex_stepper Example_for_learning_easy

Revision:
0:7caa07ab8d77
Child:
1:9a7c41e82ca5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stepper.h	Fri Sep 07 13:52:14 2018 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+#ifndef STEPPER_H
+#define STEPPER_H
+
+
+struct Stepper
+{
+    PinName step;
+    PinName dir;
+    PinName en;
+};
+
+void rotate(Stepper stepper, double period, int pix);
+
+void moveTo(Stepper xStepper, Stepper yStepper, double period, float x, float y);
+
+#endif
+