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
Diff: main.cpp
- Revision:
- 5:76dd6da3e640
- Parent:
- 4:de56a118e704
- Child:
- 6:76b89d8b62a0
--- a/main.cpp Wed Jun 25 19:35:13 2014 +0000 +++ b/main.cpp Wed Jul 30 10:28:47 2014 +0000 @@ -5,11 +5,20 @@ text generator; matrix display(p13, p12, p11, p14, p15, p17, p16); +Serial pc(USBTX, USBRX); +Serial bluetooth(p28,p27); +char line[256]; int main() { - //generator.generate("LABAS LAURYNUK!"); - //while(true){ + 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!"); } \ No newline at end of file