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:
- 5:d5bed5797bb1
- Parent:
- 4:70a1803901d1
- Child:
- 6:bfd5c9d80f48
--- a/main.cpp Thu Nov 07 15:00:28 2013 +0000 +++ b/main.cpp Thu Nov 14 07:39:19 2013 +0000 @@ -10,6 +10,7 @@ SPI spi(p5, p6, p7); //mosi, miso, sclk BusOut buffer_CS(p15,p16,p17,p18,p19,p20); Serial pc(USBTX, USBRX); // tx, rx +LocalFileSystem local("local"); unsigned int ImageBuf[3][DISPLAY_XSIZE];//16*6 unsigned int ColerMap[3][DISPLAY_XSIZE]; @@ -189,7 +190,6 @@ } } - int main() { unsigned int i = 0; @@ -199,11 +199,23 @@ /*ここを書き換えてください*/ /*=====================*/ //ET2013 ARMブース mbedコーナーにようこそ! + char strs[100]={0x82,0x64,0x82,0x73,0x82,0x51,0x82,0x4f,0x82,0x50,0x82,0x52,0x81,0x40,0x82,0x60, 0x82,0x71,0x82,0x6c,0x83,0x75,0x81,0x5b,0x83,0x58,0x81,0x40,0x82,0x8d,0x82,0x82, 0x82,0x85,0x82,0x84,0x83,0x52,0x81,0x5b,0x83,0x69,0x81,0x5b,0x82,0xc9,0x82,0xe6, 0x82,0xa4,0x82,0xb1,0x82,0xbb,0x81,0x49,0x00}; + // Read text file for display message, if exist. + FILE *fp; + fp = fopen("/local/message.txt", "r"); + if (fp != NULL) { + fgets(strs, 100, fp); + fclose(fp); +#if defined(__MICROLIB) && defined(__ARMCC_VERSION) // with microlib and ARM compiler + free(fp); +#endif + } + spi.format(16,1); spi.frequency(1000000); @@ -223,7 +235,7 @@ drawStr15x16(strs ,i,COLOR_W); ApplyColerMap(); outBordData(); - wait(0.1); + wait(0.05); } } }