![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
LED2 blinking on ST nucleo STM32F401
main.cpp@0:189da9051c4c, 2014-05-14 (annotated)
- Committer:
- yousson
- Date:
- Wed May 14 13:28:49 2014 +0000
- Revision:
- 0:189da9051c4c
ST Nucleo blink led test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
yousson | 0:189da9051c4c | 1 | #include "mbed.h" |
yousson | 0:189da9051c4c | 2 | |
yousson | 0:189da9051c4c | 3 | DigitalOut myled(LED2); |
yousson | 0:189da9051c4c | 4 | |
yousson | 0:189da9051c4c | 5 | int main() { |
yousson | 0:189da9051c4c | 6 | while(1) { |
yousson | 0:189da9051c4c | 7 | myled = 1; // LED is ON |
yousson | 0:189da9051c4c | 8 | wait_ms(1000); // 200 ms |
yousson | 0:189da9051c4c | 9 | myled = 0; // LED is OFF |
yousson | 0:189da9051c4c | 10 | wait_ms(1000); // 1 sec |
yousson | 0:189da9051c4c | 11 | } |
yousson | 0:189da9051c4c | 12 | } |