Chris Arndt
/
STM32F411_mbed5-blinky
Blinky test program for Black Pill board with STM32F411CEU6
main.cpp
- Committer:
- SpotlightKid
- Date:
- 2020-06-27
- Revision:
- 0:ec03923ace26
File content as of revision 0:ec03923ace26:
/* mbed Microcontroller Library * Copyright (c) 2019 ARM Limited * SPDX-License-Identifier: Apache-2.0 */ #include "mbed.h" #include "platform/mbed_thread.h" // Blinking rate in milliseconds #define BLINKING_RATEA_MS 200 #define BLINKING_RATEB_MS 1000 int main() { // Initialise the digital pin LED1 as an output DigitalOut led(PC_13); while (true) { led = !led; thread_sleep_for(BLINKING_RATEA_MS); led = !led; thread_sleep_for(BLINKING_RATEA_MS); led = !led; thread_sleep_for(BLINKING_RATEB_MS); led = !led; thread_sleep_for(BLINKING_RATEA_MS); } }