![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
.
Dependencies: SHT3XA mbed LIS3DH mbed-rtos USBDevice
Diff: main.cpp
- Revision:
- 0:941291e23892
- Child:
- 1:323175fe9443
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Aug 03 13:27:41 2017 +0000 @@ -0,0 +1,24 @@ +#include "mbed.h" +#include "USBSerial.h" + +// Virtual USB Serial port +USBSerial usb_serial; + +DigitalOut led(LED1); + +int main(void) +{ + int i = 0; + + // Print on STDIO + printf("USBDevice Serial started\r\n"); + + while(1) { + + // Print on Virtual USB Serial port + usb_serial.printf("I am a virtual serial port: %d\r\n", i++); + + led = !led; + wait(0.1); + } +}