quentin godbert
/
t2-stm32_thread
avec thread
Fork of T2_STM32 by
pwm.h
- Committer:
- Tioneb
- Date:
- 2018-01-14
- Revision:
- 2:ab0ccf9bb38c
- Child:
- 4:b01a3ce6ef01
File content as of revision 2:ab0ccf9bb38c:
#include "mbed.h" //SAVE_TEST 2 PwmOut mypwm(PWM_OUT); DigitalOut myled(LED1); int main() { mypwm.period_ms(10); mypwm.pulsewidth_ms(1); printf("pwm set to %.2f %%\n", mypwm.read() * 100); while(1) { myled = !myled; wait(1); } }