Desired PWM outputs

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Enis
Date:
Sat Aug 09 06:56:00 2014 +0000
Commit message:
Pwm example

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 13be21856c7e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Aug 09 06:56:00 2014 +0000
@@ -0,0 +1,25 @@
+#include"mbed.h"
+ 
+PwmOut mypwm1(PB_3);
+PwmOut mypwm2(PB_4);
+PwmOut mypwm3(PB_5);
+ 
+DigitalOut myled(LED1);
+ 
+int main() {
+    
+    mypwm1.period_ms(10);
+    mypwm1.pulsewidth_ms(5);
+ 
+    mypwm2.period_ms(20);
+    mypwm2.pulsewidth_ms(5);
+ 
+    mypwm3.period_ms(20);
+    mypwm3.pulsewidth_ms(5);
+  
+    
+    while(1) {
+        myled = !myled;
+        wait(1);
+    }
+}
diff -r 000000000000 -r 13be21856c7e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Aug 09 06:56:00 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6213f644d804
\ No newline at end of file