Ralph Fulchiero
/
OS2_PwmOut_HelloWorld
OS2 version of the classic PwmOut
main.cpp
- Committer:
- RalphF
- Date:
- 2018-09-11
- Revision:
- 0:94058fd41b33
File content as of revision 0:94058fd41b33:
#include "mbed.h" PwmOut led(LED1); int main() { // specify period first led.period(4.0f); // 4 second period led.write(0.50f); // 50% duty cycle, relative to period //led = 0.5f; // shorthand for led.write() //led.pulsewidth(2); // alternative to led.write, set duty cycle time in seconds while(1); }