Using USBSerial on BLACKPILL board.
For more details click on the link below:
Import programBlackpill_Hello
Using low cost Blackpill (STM32F411CEU6) boards with mbed.
main.cpp
- Committer:
- hudakz
- Date:
- 2021-02-11
- Revision:
- 2:9625237e90fa
- Parent:
- 1:60fefa7f384b
File content as of revision 2:9625237e90fa:
#include "mbed.h" #include "USBSerial.h" DigitalOut led1(LED1); USBSerial usbSerial; /** * @brief * @note * @param * @retval */ int main() { printf("Starting ...\r\n"); led1 = 1; // The onboard LED is active when digital output is 0 while (true) { led1 = 0; // turn the LED on ThisThread::sleep_for(50); 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) } }