miniblip serial demo

Dependencies:   USBDevice mbed

Fork of HelloWorld by Aerodyne

Revision:
2:8a14f4d5079b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 26 09:30:25 2015 +0000
@@ -0,0 +1,24 @@
+// miniblip USB Serial
+
+#include "mbed.h"
+
+
+unsigned int counter = 0;   
+Serial pc(USBTX, USBRX);    
+
+void count() {
+    // Announce lifetime
+    pc.printf("mini blip is alive for %i seconds.\n", counter);
+    counter++;  
+}
+
+int main() {
+    // Turn off miniblip buzzer
+    PwmOut speaker(P0_8);
+    speaker=0.0;
+    pc.printf("Hello world!\n");    
+    while(true) {   //Main loop
+        count();    
+        wait(1);    
+    }               
+}
\ No newline at end of file