ga

Dependencies:   mbed

Revision:
0:9d0719e821e4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Jan 20 02:52:29 2015 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+Serial pc(USBTX, USBRX);
+PwmOut pwm1(p21);
+PwmOut pwm2(p22);
+int main(){
+    while(1)
+    int y=600;
+    int x=500;
+    int f;
+    if(x-y>0){
+    for(f = 1000;f < 3000;f+=10);
+    pwm1.pulsewidth_us(f);
+    }else if(x-y<0){
+        for(f = 1000;f <2000;f+=10);
+        pwm2.pulsewidth_us(f);
+    }
+    }
+        
\ No newline at end of file