A fork of a fine man's work. simplified. No microstepping etc, just a work in progress

Fork of BipoarStepperMotor by Harsha vardan

Revision:
4:a3d8d60147dd
Parent:
3:944e51dd1e4c
Child:
5:f9404f00deda
--- a/sMotor.h	Thu Jan 29 15:50:34 2015 +0000
+++ b/sMotor.h	Tue Feb 03 01:02:39 2015 +0000
@@ -1,11 +1,11 @@
 /*
 ##############################################
-##    Program Created by Harshavardan61     ##
+##Original Program Created by Harshavardan61##
 ##############################################
         ---- harshavardan61@gmail.com -----
-        
-This library was made for 4-Phase Stepper Motors
-I don't take any resposability for the damage caused to your equipment.
+Extended by Jason Brewer 2015
+to adapt to the stepper motor + linear actuator
+supplied by Selim Yilmaz
 
 */
 #ifndef MBED_SMOTOR_H
@@ -16,11 +16,11 @@
 class sMotor {
 public:
 
-    sMotor(PinName A0, PinName A1, PinName A2, PinName A3); //motor constructor
+    sMotor(PinName A0, PinName A1, PinName A2, PinName A3, const int maxSteps); //motor constructor
 
     void step(int num_steps, int direction, int speed);
-    void anticlockwise();
-    void clockwise();
+    void anticlockwise(int num_steps);
+    void clockwise(int num_steps);
 
 
 private:
@@ -29,6 +29,8 @@
     DigitalOut _A1;
     DigitalOut _A2;
     DigitalOut _A3;
+    int _motorPosition;
+    int _maxSteps;
 
 };