sample for my stepper lib https://os.mbed.com/users/Dennis_Yu/code/stepper/

Dependencies:   mbed stepper

Files at this revision

API Documentation at this revision

Comitter:
Dennis_Yu
Date:
Fri Jul 27 11:47:58 2018 +0000
Commit message:
first commit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
stepper.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 4324116dc48b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jul 27 11:47:58 2018 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+#include "stepper.h"
+
+int main() 
+{
+    stepperMotor motor(PC_5, PC_4, PD_2, PC_8, 0.0001);
+    //while(1)
+    {
+        motor.enable(4000);
+        while(motor.remain != 0)
+            ;
+        wait(1.5);
+        motor.enable(4000);
+        while(motor.remain != 0)
+            ;
+        wait(.5);
+    }
+    return 0;
+}
diff -r 000000000000 -r 4324116dc48b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jul 27 11:47:58 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a7c7b631e539
\ No newline at end of file
diff -r 000000000000 -r 4324116dc48b stepper.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stepper.lib	Fri Jul 27 11:47:58 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Dennis_Yu/code/stepper/#94661b4fa780