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
main.cpp
- Committer:
- tsillen
- Date:
- 2015-04-30
- Revision:
- 0:40a2ad5e1ba6
File content as of revision 0:40a2ad5e1ba6:
#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);
// }
}