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.
Revision 0:a17e11284fc5, committed 2017-10-05
- Comitter:
- ykuroda
- Date:
- Thu Oct 05 07:50:42 2017 +0000
- Commit message:
- 1st commit;
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 Oct 05 07:50:42 2017 +0000
@@ -0,0 +1,23 @@
+// Motor Control ... Mechatronics example program
+//
+// 2017.10.05 ... Y.Kuroda
+//
+#include "mbed.h"
+
+PwmOut a1(D1);
+DigitalOut a2(D12);
+
+int main() {
+
+ a1.period_ms(1);
+
+ while(1) {
+ a1 = 0.1; // duty is 10%
+ a2 = 0;
+ wait(3); // 3 s
+
+ a1 = 0.9; // duty is 10%!!!
+ a2 = 1;
+ wait(3); // 3 sec
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Oct 05 07:50:42 2017 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/235179ab3f27 \ No newline at end of file