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:afafa545dcb6, committed 2015-08-26
- Comitter:
- soulx
- Date:
- Wed Aug 26 01:30:44 2015 +0000
- Commit message:
- lab 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 afafa545dcb6 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Aug 26 01:30:44 2015 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+PwmOut mypwm(PWM_OUT);
+PwmOut myled(LED1);
+
+
+int main()
+{
+
+ mypwm.period_us(2);
+ mypwm.pulsewidth_us(1);
+
+ printf("pwm set to %.2f %%\n", mypwm.read() * 100);
+
+ myled.period(1.0f);
+
+ while(1) {
+ myled = myled + 0.01f;
+ wait(0.2);
+ if(myled == 1.0f) {
+ myled = 0;
+ }
+ }
+}
diff -r 000000000000 -r afafa545dcb6 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Aug 26 01:30:44 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/9ad691361fac \ No newline at end of file