USBSerial Hello World
Fork of USBSerial_HelloWorld by
USBSerial Hello world example code.
Revision 10:d74aaa6c1f4e, committed 2018-08-07
- Comitter:
- MACRUM
- Date:
- Tue Aug 07 15:56:53 2018 +0000
- Parent:
- 9:d88699a0905a
- Commit message:
- Initial commit
Changed in this revision
diff -r d88699a0905a -r d74aaa6c1f4e USBDevice.lib --- a/USBDevice.lib Fri Mar 01 13:33:02 2013 +0000 +++ b/USBDevice.lib Tue Aug 07 15:56:53 2018 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/USBDevice/#335f2506f422 +http://mbed.org/users/mbed_official/code/USBDevice/#01321bd6ff89
diff -r d88699a0905a -r d74aaa6c1f4e main.cpp --- a/main.cpp Fri Mar 01 13:33:02 2013 +0000 +++ b/main.cpp Tue Aug 07 15:56:53 2018 +0000 @@ -1,14 +1,17 @@ #include "mbed.h" #include "USBSerial.h" -//Virtual serial port over USB -USBSerial serial; - +USBSerial serial; // 9600 bps +DigitalOut led(LED1); + int main(void) { - + + int count = 0; + serial.printf("Hello, Mbed world.\n\n"); while(1) { - serial.printf("I am a virtual serial port\r\n"); - wait(1); + led = !led; + serial.printf("count = %d\n", count++); + wait(0.5); } } \ No newline at end of file
diff -r d88699a0905a -r d74aaa6c1f4e mbed.bld --- a/mbed.bld Fri Mar 01 13:33:02 2013 +0000 +++ b/mbed.bld Tue Aug 07 15:56:53 2018 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/3d0ef94e36ec \ No newline at end of file +https://os.mbed.com/users/mbed_official/code/mbed/builds/a7c7b631e539 \ No newline at end of file