![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Serial control with STM32 Nucleo
main.cpp
- Committer:
- lucadevito
- Date:
- 2021-04-29
- Revision:
- 0:fde0aa5b370d
- Child:
- 1:457c0c664181
File content as of revision 0:fde0aa5b370d:
/* 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_RATE_MS 500 Serial pc(USBTX,USBRX); int main() { // Initialise the digital pin LED1 as an output DigitalOut led(LED1); pc.printf("Hello World !\r\n"); pc.printf("Here I'm !\r\n"); pc.printf("It works !\r\n"); while (true) { led = !led; thread_sleep_for(BLINKING_RATE_MS); } }