Primera clase manejo de PWM Feb/14

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Bethory
Date:
Thu Feb 15 02:25:22 2018 +0000
Commit message:
Angel Trujillo - Daniel Vizcaya

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
diff -r 000000000000 -r 8df7a9369da9 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Feb 15 02:25:22 2018 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+PwmOut mypwm(PA_3);
+
+DigitalOut myled(PA_5);
+
+int main() {
+    
+    mypwm.period_ms(20);
+    //mypwm.pulsewidth_us(1000);
+  
+    
+    while(1) {
+        //myled = !myled;
+       // wait(1);
+        for (int i=1000;i<=2000;i=i+100)
+        {
+          mypwm.pulsewidth_us(i);
+          wait(2); 
+        }
+    }
+}
diff -r 000000000000 -r 8df7a9369da9 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Feb 15 02:25:22 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/7130f322cb7e
\ No newline at end of file