mbed_example
/
PwmOut_ex_2
Additional PwmOut example
main.cpp
- Committer:
- sarahmarshy
- Date:
- 2017-06-23
- Revision:
- 1:cab93cb2f242
- Parent:
- 0:248dfc85bbf9
File content as of revision 1:cab93cb2f242:
#include "mbed.h" PwmOut led(LED2); int main() { // specify period first, then everything else led.period(4.0f); // 4 second period led.pulsewidth(2); // 2 second pulse (on) while(1); // led flashing }