Toshihisa T
/
pwmtest
LED1 light use with PWM
main.cpp
- Committer:
- tosihisa
- Date:
- 2010-10-02
- Revision:
- 0:9863300d25b7
File content as of revision 0:9863300d25b7:
#include "mbed.h" PwmOut led(LED1); int main() { while(1) { for(float p = 0.0f; p < 0.5f; p += 0.01f) { led = p; wait(0.02); } for(float p = 0.49f; p > 0.0f; p -= 0.01f) { led = p; wait(0.02); } wait(0.5); } }