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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers matrix.h Source File

matrix.h

00001 #ifndef MBED_MATRIX_H_
00002 #define MBED_MATRIX_H_
00003 
00004 #include "mbed.h"
00005 
00006 void led_thread(void const *args);
00007 
00008 class matrix{
00009 private:
00010     int length;
00011     int display[8][16];
00012     Serial pc;
00013     LocalFileSystem local;
00014     FILE *fp; 
00015     DigitalOut in3;
00016     DigitalOut in2;
00017     DigitalOut in1;
00018     DigitalOut clr1;
00019     DigitalOut clr;
00020     DigitalOut clk1;
00021     DigitalOut clk;   
00022 public:
00023     matrix(PinName _in1, PinName _in2, PinName _in3, PinName _clr, PinName _clr1, PinName _clk, PinName _clk1);
00024     void show();
00025     void clear();
00026     void multiplex();
00027     void clock(char *buffer, bool dot);
00028     void see();
00029 };    
00030 
00031 #endif /* matrix_H_ */