ga

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
changzhe8387
Date:
Tue Jan 20 02:52:29 2015 +0000
Commit message:
sv

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	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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Jan 20 02:52:29 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file