stepper motor controller

Dependents:   Printer

Fork of Stepper_Motor_X27168 by Stepper Motor

Files at this revision

API Documentation at this revision

Comitter:
ebeauchemin3
Date:
Fri Apr 29 14:57:46 2016 +0000
Parent:
0:c346170974bc
Commit message:
Final

Changed in this revision

StepperMotor_X27168.h Show annotated file Show diff for this revision Revisions of this file
Stepper_Motor_X27168.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r c346170974bc -r 64889c1fd698 StepperMotor_X27168.h
--- a/StepperMotor_X27168.h	Tue Oct 20 00:36:06 2015 +0000
+++ b/StepperMotor_X27168.h	Fri Apr 29 14:57:46 2016 +0000
@@ -15,10 +15,11 @@
 #ifndef MBED_STEPPER_MOTOR_X27168
 #define MBED_STEPPER_MOTOR_X27168
 
+#include "rtos.h"
 #include "mbed.h"
 
 #define MAX_POS         629         // Maximum Steps Possible (not degrees)
-#define DEFAULT_SPEED   500         // Default Speed in Steps per second
+#define DEFAULT_SPEED   500         // Default Speed in Steps per second, was 500 changed to 50
 
 /** Stepper Motor control class
  *
diff -r c346170974bc -r 64889c1fd698 Stepper_Motor_X27168.cpp
--- a/Stepper_Motor_X27168.cpp	Tue Oct 20 00:36:06 2015 +0000
+++ b/Stepper_Motor_X27168.cpp	Fri Apr 29 14:57:46 2016 +0000
@@ -73,7 +73,7 @@
             motor_control = 0x0;
             break;
     }
-    wait(1.0/speed);
+    wait(1.0/speed); //Thread::wait(1000.0/speed);
     return cur_position;
 }