Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Revision 0:1870a0163767, committed 2014-07-03
- 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