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:40a2ad5e1ba6, committed 2015-04-30
- Comitter:
- tsillen
- Date:
- Thu Apr 30 21:57:52 2015 +0000
- Commit message:
- Working code, verified with scope
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 Apr 30 21:57:52 2015 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+PwmOut mypwm(A0);
+
+DigitalOut myled(LED1);
+
+int main() {
+
+ mypwm.period_ms(20); //20ms period voor esc
+ mypwm.pulsewidth_us(1500); //neutraal voor cal
+ wait(3); //give esc cal neutral some time , this is just a random value
+ mypwm.pulsewidth_us(1400); //reverse
+ wait(1);
+ mypwm.pulsewidth_us(1600); //forward
+ wait(1);
+ mypwm.pulsewidth_us(1500); //neutraal
+
+
+// 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 Apr 30 21:57:52 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8ab26030e058 \ No newline at end of file