dangerous spin things

Dependencies:   Motor mbed

Files at this revision

API Documentation at this revision

Comitter:
tsevcik08
Date:
Thu Oct 09 19:08:54 2014 +0000
Child:
1:90b569aa2335
Commit message:
spin crain

Changed in this revision

Motor.lib Show annotated file Show diff for this revision Revisions of this file
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/Motor.lib	Thu Oct 09 19:08:54 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/Motor/#f265e441bcd9
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Oct 09 19:08:54 2014 +0000
@@ -0,0 +1,25 @@
+#include "mbed.h"
+#include "Motor.h"
+
+Motor kate(p26, p29, p30);
+DigitalIn sw2(p17);
+DigitalIn sw3(p18);
+
+int main()
+{
+    float mspeed;
+    while(1) {
+        if( sw2 == 1 ) {
+            mspeed = 0.35;
+            kate.speed(mspeed);
+            wait(.03);
+            mspeed = 0.0;
+            kate.speed(mspeed);
+            wait(.05);
+            
+        } else if (sw2 == 0) {
+            mspeed = 0.0;
+            kate.speed(mspeed);
+        }
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Oct 09 19:08:54 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file