This is a demo code for stepper motor
Dependencies: StepperMotorUni mbed
Diff: main.cpp
- Revision:
- 0:85fecbeec987
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Feb 05 07:37:59 2016 +0000
@@ -0,0 +1,18 @@
+// "Hello" program for StepperMotorUni class library
+
+
+#include "mbed.h"
+#include "StepperMotorUni.h"
+
+StepperMotorUni motor( PTB0, PTB1, PTB2, PTB3);
+int i;
+
+int main()
+{ motor.set_pps( 200 );
+ for ( i = 200; i<1000; i=i+100)
+ {
+ motor.move_steps(i);
+ wait( 5 );
+
+ }
+}