pausa

Dependencies:   mbed

Fork of primercorte by edson antonio vargas villarreal

Revision:
0:0119b611fc51
diff -r 000000000000 -r 0119b611fc51 stepmotor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stepmotor.h	Wed Apr 11 02:19:13 2018 +0000
@@ -0,0 +1,23 @@
+
+
+#ifndef STEP_MOTOR_H
+#define STEP_MOTOR_H
+ 
+#include "mbed.h"
+ 
+class stepmotor {
+public:
+ 
+    stepmotor(PinName in1, PinName in2, PinName in3, PinName in4); 
+    void step(uint32_t num_steps,bool cw);
+    void set_speed(int speed);
+    uint32_t get_speed();
+private:
+    BusOut motor_out;
+    uint32_t motorSpeed; 
+    int8_t nstep;
+    
+    void move();
+};
+ 
+#endif
\ No newline at end of file