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.
main.cpp
- Committer:
- Calamaro
- Date:
- 2015-02-20
- Revision:
- 2:073d39b53874
- Parent:
- 0:4860a91fb495
- Child:
- 3:f057c1dbef0a
File content as of revision 2:073d39b53874:
#include "mbed.h" PwmOut mypwm(PA_5); int pulse_per = 10; int main() { for(int i = 0, i < pulse_per, i++){ mypwm.period_ms(pulse_per); mypwm.pulsewidth_ms(i); printf("pwm set to %.2f %%\n", mypwm.read() * 100); } }