Blue LED matrix (8x16) program. Gets text string through bluetooth and displays it on led matrix. Also has a clock function- get system time from a phone through bluetooth and enters clock mode. In clock mode it acts as a clock showing hours and minutes and blinking led every second. Clock mode can be broken if a text string is received through bluetooth.

Dependencies:   mbed

Revision:
19:2b14139fb19f
Parent:
18:fe3809cdc50a
Parent:
11:996c98ad9d73
Child:
20:8055a5b5dba0
--- a/main.cpp	Wed Nov 19 09:14:55 2014 +0000
+++ b/main.cpp	Wed Nov 19 09:19:28 2014 +0000
@@ -50,7 +50,6 @@
             display.clock(buffer, dot);
         }
         else if (interrupt_flag == 0) display.show();
-        //wait(0.1);
     }
 }
 
@@ -59,14 +58,10 @@
     int i, j = 0;
     i = 10 * (bluetooth.getc() - 48);
     i += bluetooth.getc() - 48;
-    if(i > 0){
-        mode_buffer = false;
-        do{ 
-            line_buffer[j] = bluetooth.getc();
-            j++;
-            wait(0.0004);       
-        }
-        while(bluetooth.readable() && (j < i) && (j < 99));
+    do{ 
+        line[j] = bluetooth.getc();
+        j++;
+        wait(0.0004);       
     }
     else{
         mode_buffer = true;