JEISSON CASTRO / Mbed 2 deprecated pwm

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
JDC128
Date:
Wed Apr 19 23:25:25 2017 +0000
Commit message:
pmw

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 2933e08620c9 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 19 23:25:25 2017 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+DigitalOut my_led(LED1);
+DigitalOut my_pwm(P_A0); // IO used by pwm_io function
+
+int main(){
+    
+my_pwm.periodo_ms(20);
+
+while(1){
+    my_pwm.pulsewidth_ms(1);
+    wait(2);
+    my_pwm.pulsewidth_us(1500);
+    wait(2);
+    my_pwm.pulsewidth_ms(2);
+    wait(2);
+    }
+    
+}
\ No newline at end of file
diff -r 000000000000 -r 2933e08620c9 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Apr 19 23:25:25 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/mbed_official/code/mbed/builds/856d2700e60b
\ No newline at end of file