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:
- 3:f057c1dbef0a
- Parent:
- 2:073d39b53874
File content as of revision 3:f057c1dbef0a:
#include "mbed.h" PwmOut mypwm(PA_5); int pulse_per = 100; int main() { while(1) { for(int i = 0; i < pulse_per; i++) { mypwm.period_us(pulse_per); mypwm.pulsewidth_us(i); wait(0.01); } for(int i = pulse_per; i > 0; i--) { mypwm.period_us(pulse_per); mypwm.pulsewidth_us(i); wait(0.01); } } }