NervousPuppySprintTwo

Dependencies:   C12832_lcd Servo USBHost mbed

Fork of USBHostSerial_HelloWorld by Samuel Mokrani

Revision:
2:8f3478b5d434
Parent:
1:6b743a29c48a
Child:
7:3b14ddcf6d8e
--- a/main.cpp	Tue Mar 12 17:33:20 2013 +0000
+++ b/main.cpp	Wed Mar 13 10:32:40 2013 +0000
@@ -8,13 +8,20 @@
     USBHostSerial serial;
     
     while(1) {
+    
+        // try to connect a serial device
         while(!serial.connect())
             Thread::wait(500);
         
+        // in a loop, print all characters received
+        // if the device is disconnected, we try to connect it again
         while (1) {
+        
+            // if device disconnected, try to connect it again
             if (!serial.connected())
                 break;
 
+            // print characters received
             while (serial.available()) {
                 printf("%c", serial.getc());
             }