Using USBSerial on BLACKPILL board.
For more details click on the link below:
Import programBlackpill_Hello
Using low cost Blackpill (STM32F411CEU6) boards with mbed.
Diff: main.cpp
- Revision:
- 2:9625237e90fa
- Parent:
- 1:60fefa7f384b
--- a/main.cpp Sat Jan 30 11:20:01 2021 +0000 +++ b/main.cpp Thu Feb 11 06:28:02 2021 +0000 @@ -2,7 +2,7 @@ #include "USBSerial.h" DigitalOut led1(LED1); -USBSerial usbSerial; // connection is not blocked when USB is not plugged in +USBSerial usbSerial; /** * @brief @@ -13,11 +13,11 @@ int main() { printf("Starting ...\r\n"); - led1 = 1; // off + led1 = 1; // The onboard LED is active when digital output is 0 while (true) { - led1 = 0; // on + led1 = 0; // turn the LED on ThisThread::sleep_for(50); - led1 = 1; // off + led1 = 1; // turn the LED off ThisThread::sleep_for(1000); printf("Blink\r\n"); usbSerial.printf("I am a USB serial port\r\n"); // 12 Mbit/s (USB full-speed)