Anthem / Mbed 2 deprecated brad_Nucleo_pwm

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
bgrissom
Date:
Thu Jul 03 19:54:55 2014 +0000
Commit message:
I can only get the PWM frequency up to 2.7 KHz

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	Thu Jul 03 19:54:55 2014 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+PwmOut mypwm(D9);
+
+DigitalOut myled(LED1);
+
+int main() {
+    
+    //mypwm.write(0.1f); // 50% duty cycle
+    mypwm.period_us(2);
+    mypwm.pulsewidth_us(1);
+  
+    printf("pwm set to %.2f %%\n", mypwm.read() * 100);
+    
+    while(1) {
+        myled = !myled;
+        wait(1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jul 03 19:54:55 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file