Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LEDMatrix_Master by
Diff: main.cpp
- Revision:
- 3:5605bd4d6295
- Parent:
- 2:402191724e28
- Child:
- 4:70a1803901d1
--- a/main.cpp Sat Nov 02 23:57:14 2013 +0000 +++ b/main.cpp Thu Nov 07 14:08:53 2013 +0000 @@ -344,14 +344,18 @@ unsigned char f_mode = 0; unsigned int i = 0; unsigned char coler = 0; + char tmpstr[100]; + unsigned int cnt_tmpstr = 0; char strs[100]={0x82,0x6C,0x82,0x81,0x82,0x8B,0x82,0x85,0x82,0x65,0x82,0x81,0x82,0x89,0x82,0x92, 0x82,0x73,0x82,0x8F,0x82,0x8B,0x82,0x99,0x82,0x8F,0x82,0x51,0x82,0x4F,0x82,0x50,0x82,0x52,0x00}; spi.format(16,1); spi.frequency(1000000); + memset(tmpstr,0,sizeof(tmpstr)); + memset(ImageBuf,0,sizeof(ImageBuf)); i=0; - wait(3); + wait(1); //TestMode(); SetRandamColer(); // SetRainbowColer(); @@ -366,7 +370,7 @@ drawStr15x16(strs ,i,COLOR_W); ApplyColerMap(); outBordData(); - wait(0.2); + wait(0.1); } } while(1) @@ -410,7 +414,13 @@ } if(pc.readable()) { - f_mode = 0; + tmpstr[cnt_tmpstr] = pc.getc(); + if(tmpstr[cnt_tmpstr] == '\n') + { + tmpstr[cnt_tmpstr+1] = 0; + pc.printf("%s\r\n",tmpstr); + } + cnt_tmpstr++; } outBordData(); wait(0.1);