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:598029dcf103, committed 2021-07-13
- Comitter:
- kinii
- Date:
- Tue Jul 13 12:35:21 2021 +0000
- Commit message:
- first 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 |
diff -r 000000000000 -r 598029dcf103 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Jul 13 12:35:21 2021 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+AnalogIn pwm_width(p20);
+AnalogIn pwm_period(p19);
+PwmOut p1(p21);
+
+int main() {
+ while(1) {
+ float pwm_p = pwm_width.read();
+ p1 = pwm_p;
+ float pwm_w = pwm_period.read()*1000;
+ p1.period_ms((int)pwm_w);
+ printf("p:%f, w:%f, pwm: %f \r\n", pwm_p, pwm_w, p1.read());
+ wait(1);
+
+ }
+}
diff -r 000000000000 -r 598029dcf103 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jul 13 12:35:21 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file