Primera clase manejo de PWM Feb/14

Dependencies:   mbed

Revision:
0:8df7a9369da9
--- /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); 
+        }
+    }
+}