Test out DigitalOut on Teensy 3.1

Dependencies:   mbed USBDevice

Files at this revision

API Documentation at this revision

Comitter:
yoonghm
Date:
Sun Jul 26 01:40:06 2015 +0000
Parent:
0:8495741fab9c
Commit message:
Include USBDevice

Changed in this revision

USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 8495741fab9c -r e452bc59d245 USBDevice.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Sun Jul 26 01:40:06 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/USBDevice/#f3cad7e6984e
diff -r 8495741fab9c -r e452bc59d245 main.cpp
--- a/main.cpp	Sat Jul 25 10:29:43 2015 +0000
+++ b/main.cpp	Sun Jul 26 01:40:06 2015 +0000
@@ -1,11 +1,17 @@
-#include "mbed.h"
+// MBED_BLINKY with Teensy 3.1 
+
+// You need to update the latest USBDevice library
 
-// MBED_BLINKY with Teensy 3.1 
-// LED2, LED3, LED3, LED4, LED_RED, LED_GREEN, LED_BLUE, PTC5 are the same 
-DigitalOut myled(LED1); 
+#include "mbed.h"
+#include "USBSerial.h"
+
+DigitalOut myled(LED1); // Onboard LED
+USBSerial  pc;          // Virtual serial port over USB
+ 
  
 int main() {
     while(1) {
+        pc.printf("Hello World\r\n");
         myled = 1;
         wait(0.2);
         myled = 0;