![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Nucleo_Example_Demo.
main.cpp
- Committer:
- makeworks
- Date:
- 2017-09-22
- Revision:
- 3:a7b520fad123
- Parent:
- 1:6554c60faa06
- Child:
- 4:b5ca7f122564
File content as of revision 3:a7b520fad123:
#include "mbed.h" DigitalOut led_blink(LED1); PwmOut led_pwm(LED1); int main() { led_blink = 1; // LED is ON wait(0.2); // 200 ms led_blink = 0; // LED is OFF wait(0.8); // 800 ms while (1) { led_pwm = led_pwm + 0.01; wait(0.2); if (led_pwm == 1.0) { led_pwm = 0; } } }