avec thread

Dependencies:   mbed

Fork of T2_STM32 by Atechsys

main.cpp

Committer:
Tioneb
Date:
2017-12-22
Revision:
0:c365c76c11c3
Child:
1:979edb6d1559

File content as of revision 0:c365c76c11c3:

#include "mbed.h"

//SAVE_TEST

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);
    }
}