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

Files at this revision

API Documentation at this revision

Comitter:
DaniusKalv
Date:
Sat Oct 03 17:11:30 2015 +0000
Parent:
21:db8dadfd7d2a
Commit message:
Hey Dimitar

Changed in this revision

letters.h 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
--- a/letters.h	Mon Nov 24 17:52:09 2014 +0000
+++ b/letters.h	Sat Oct 03 17:11:30 2015 +0000
@@ -475,15 +475,15 @@
     0 0 0 1 0 0 0 0 0x10
 };*/
 
-uint8_t letterr[8] = { 0x00, 0x00, 0x70, 0x80, 0x80, 0x80, 0x80, 0x80};
+uint8_t letterr[8] = { 0x00, 0x00, 0x00, 0x70, 0x80, 0x80, 0x80, 0x80};
   /*0 0 0 0 0 0 0 0 0x00
     0 0 0 0 0 0 0 0 0x00
+    0 0 0 0 0 0 0 0 0x00
     0 1 1 1 0 0 0 0 0x70
     1 0 0 0 0 0 0 0 0x80
     1 0 0 0 0 0 0 0 0x80
     1 0 0 0 0 0 0 0 0x80
     1 0 0 0 0 0 0 0 0x80
-    1 0 0 0 0 0 0 0 0x80
 };*/ 
 
 uint8_t letter_s[8] = { 0x00, 0x00, 0x60, 0x90, 0x40, 0x20, 0x90, 0x60};
--- a/main.cpp	Mon Nov 24 17:52:09 2014 +0000
+++ b/main.cpp	Sat Oct 03 17:11:30 2015 +0000
@@ -20,7 +20,7 @@
     char buffer[4];
     bool dot;
     pc.baud(115200);
-    bluetooth.baud(38400);
+    bluetooth.baud(115200);
     void (*foo)() = &receive;
     bluetooth.attach(foo, Serial::RxIrq);
     generator.generate("Hello world!");
@@ -64,7 +64,7 @@
         do{ 
             line_buffer[j] = bluetooth.getc();
             j++;
-            wait(0.0004);       
+            wait(0.0001);       
         }
         while(bluetooth.readable() && (j < i) && (j < 99));
     }
@@ -72,7 +72,7 @@
         mode_buffer = true;
         for (int i = 0; i < 10; i++){                   
             line_buffer[i] = bluetooth.getc();
-            wait(0.0004);
+            wait(0.0001);
         }
         realTime = atoi(line_buffer);
         set_time(realTime);