a simplistic controller to run a pump

Dependencies:   mbed

Revision:
0:4f21cc600d24
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Dec 14 23:54:59 2013 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+
+DigitalOut outA(p21), outB(p22);
+PwmOut pwm(p23);
+
+int main(void)
+{
+    outA=0;
+    outB=1;
+    float out=0;
+    while (1) {
+        pwm.write(out);
+        out+=0.1f;
+        if (out>=1.0f) {
+            out=0;
+        }
+        wait(0.5);
+    }
+    return 0;
+}
\ No newline at end of file