Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
user153739798366067129
Date:
Sun Nov 22 05:18:57 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Nov 22 05:18:57 2009 +0000
@@ -0,0 +1,40 @@
+// This is another test, this time using pwm to control the clock.  it runs different 
+// speeds for a certain amount of time.
+// i am using a circuit built around a STK672-330 with connected stepper.
+
+
+
+#include "mbed.h"
+
+PwmOut clk(21);
+
+DigitalOut enable(5);
+DigitalOut direction(6);
+
+int i = 0;
+
+int main()
+{
+
+clk.period_us(1000);
+
+enable = 1;
+direction = 1;
+clk = 0.5;
+
+    while (1) {
+    
+        clk.period_us(750);
+        clk = 0.5;
+        wait(2);
+        clk.period_us(500);
+        clk = 0.5;
+        wait(2);
+        clk.period_us(250);
+        clk = 0.5;
+        wait(2);
+        clk.period_us(500);
+        clk = 0.5;
+        wait(2);
+        }   
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Nov 22 05:18:57 2009 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/fcb9359f0959