n

Dependencies:   Motor mbed

Files at this revision

API Documentation at this revision

Comitter:
pforrestal75
Date:
Mon Feb 22 19:48:22 2016 +0000
Commit message:
z

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
diff -r 000000000000 -r 2e26033f5993 Motor.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Motor.lib	Mon Feb 22 19:48:22 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/aberk/code/Motor/#c75b234558af
diff -r 000000000000 -r 2e26033f5993 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Feb 22 19:48:22 2016 +0000
@@ -0,0 +1,54 @@
+#include "mbed.h"
+#include "Motor.h"
+
+DigitalOut spinner(LED1);
+DigitalOut plunger(LED2);
+Motor spinner1(p26,p29,p30);
+Motor plunger1(p26,p29,p30);
+
+char button;
+int off;
+int off1;
+
+int main()
+{
+
+    printf("Type s for Spinner");
+    scanf("%c",&button);
+    while(off==0) {
+        if (button=='s') {
+            spinner=1;
+            spinner1.speed(1);
+            while(off1==0) {
+                printf("Type p for Plunger");
+                scanf("%c",&button);
+                if (button=='p') {
+                    plunger=1;
+                    plunger1.speed(1);
+                }
+                scanf("%c",&button);
+                if (button=='p') {
+
+
+                    plunger=0;
+                    plunger1.speed(0);
+                    off1=1;
+                }
+            }
+        }
+        scanf("%c",&button);
+        if(button=='s') {
+            spinner=0;
+            spinner1.speed(0);
+            off=1;
+        }
+
+    }
+
+
+
+
+
+
+
+}
diff -r 000000000000 -r 2e26033f5993 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Feb 22 19:48:22 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file