example for easyStepper

Dependencies:   mbed easyStepper

Files at this revision

API Documentation at this revision

Comitter:
Dennis_Yu
Date:
Fri Sep 07 14:09:40 2018 +0000
Commit message:
example for easyStepper

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Sep 07 14:09:40 2018 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "stepper.h"
+
+DigitalOut myled(LED1);
+
+Stepper myStepper[2] = 
+{
+    {PC_5, PC_4, PD_2}, 
+    {PA_5, PA_4, PA_2},
+};
+
+int main() {
+    while(1)
+    {
+        rotate(myStepper[0], 0.0002, 1000);
+        rotate(myStepper[0], 0.0002, -1000);
+        rotate(myStepper[1], 0.0002, 1000);
+        rotate(myStepper[1], 0.0002, -1000);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Sep 07 14:09:40 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/a97add6d7e64
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/stepper.lib	Fri Sep 07 14:09:40 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Dennis_Yu/code/easyStepper/#9a7c41e82ca5