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

main.cpp

Committer:
DaniusKalv
Date:
2014-07-30
Revision:
5:76dd6da3e640
Parent:
4:de56a118e704
Child:
6:76b89d8b62a0

File content as of revision 5:76dd6da3e640:

#include "mbed.h"
#include "matrix.h"
#include "text.h"
#include "rtos.h"

text generator;
matrix display(p13, p12, p11, p14, p15, p17, p16);
Serial pc(USBTX, USBRX);
Serial bluetooth(p28,p27);
char line[256];

int main() {
    bluetooth.baud(38400);
    generator.generate("LIAULIUS");
    while(true){
        if (bluetooth.readable()){
            bluetooth.gets(line, 10);
            pc.printf("\r\n%s", line);
            generator.generate(line);
        }
        display.show();
    }
    //matrix("WELCOME!");
}