Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:b7d3acf8e391, committed 2009-11-22
- Comitter:
- user153739798366067129
- Date:
- Sun Nov 22 05:14:24 2009 +0000
- Commit message:
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 |
diff -r 000000000000 -r b7d3acf8e391 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Nov 22 05:14:24 2009 +0000
@@ -0,0 +1,34 @@
+
+// This program tests how many clock cycles it takes to drive the motor
+// one revolution. in this case it takes 400 clocks.
+// i am using a circuit built around a STK672-330 with attached stepper.
+
+
+
+
+#include "mbed.h"
+
+DigitalOut enable(5);
+DigitalOut direction(6);
+DigitalOut clk(7);
+int i = 0;
+
+int main () {
+
+ enable = 1;
+ direction = 1;
+ i = 0;
+ while (i != 40000) { // run the motor 100 revolutions, 40 seconds.
+
+ clk = 1;
+ wait_us(500);
+ clk = 0;
+ wait_us(500);
+
+ i += 1;
+ }
+
+ enable = 0;
+
+ }
+
\ No newline at end of file
diff -r 000000000000 -r b7d3acf8e391 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Nov 22 05:14:24 2009 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/fcb9359f0959