![](/media/cache/profiles/pista-2018.jpg.50x50_q85.jpg)
Mbed USBSerial "Hello world" example. Just Open a terminal window and see the result. Note that no baudrate setting is necessary.
Diff: main.cpp
- Revision:
- 0:7d5e1b4145a3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Jun 16 12:17:17 2022 +0000 @@ -0,0 +1,18 @@ + +/* Lab10_USBserail + * + * Mbed USBSerial Hello world" example + * Just Open a terminal window and see the result. + * Note that no baudrate setting is necessary. + */ + +#include "mbed.h" +#include "USBSerial.h" + +USBSerial serial; //Virtual serial port over USB +int main(void) { + while(1) { + serial.printf("I am a virtual serial port\r\n"); + wait(1); + } +} \ No newline at end of file