![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
new commit
Dependencies: SPI_TFT_ILI9341 TFT_fonts mbed
Fork of TFT_Test_ILI9341 by
Revision 1:6c7ede042721, committed 2017-10-15
- Comitter:
- szqt
- Date:
- Sun Oct 15 20:20:46 2017 +0000
- Parent:
- 0:414a960bd52e
- Commit message:
- new commit
Changed in this revision
diff -r 414a960bd52e -r 6c7ede042721 SPI_TFT_ILI9341.lib --- a/SPI_TFT_ILI9341.lib Wed Jun 12 22:56:43 2013 +0000 +++ b/SPI_TFT_ILI9341.lib Sun Oct 15 20:20:46 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/dreschpe/code/SPI_TFT_ILI9341/#da1bf437cbc1 +http://mbed.org/users/dreschpe/code/SPI_TFT_ILI9341/#b2b3e5430f81
diff -r 414a960bd52e -r 6c7ede042721 TFT_fonts.lib --- a/TFT_fonts.lib Wed Jun 12 22:56:43 2013 +0000 +++ b/TFT_fonts.lib Sun Oct 15 20:20:46 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/dreschpe/code/TFT_fonts/#419d21bfc20c +http://mbed.org/users/dreschpe/code/TFT_fonts/#76774250fcec
diff -r 414a960bd52e -r 6c7ede042721 main.cpp --- a/main.cpp Wed Jun 12 22:56:43 2013 +0000 +++ b/main.cpp Sun Oct 15 20:20:46 2017 +0000 @@ -1,4 +1,4 @@ - // example to test the TFT Display +// example to test the TFT Display // Thanks to the GraphicsDisplay and TextDisplay classes // test2.bmp has to be on the mbed file system @@ -17,29 +17,42 @@ // the TFT is connected to SPI pin 11-14 -SPI_TFT_ILI9341 TFT(p5, p6, p7, p8, p9, p10,"TFT"); // mosi, miso, sclk, cs, reset, dc +//SPI_TFT_ILI9341 TFT(p5, p6, p7, p8, p9, p10,"TFT"); // mosi, miso, sclk, cs, reset, dc +//SPI_TFT_ILI9341 TFT(D4, D5, D3, D6, D7, D8,"TFT"); // mosi, miso, sclk, cs, reset, dc +//DigitalOut LCD_LED(D9); +//DigitalOut myled(LED1); + +SPI_TFT_ILI9341 TFT(D11, D12, D13, D10, D8, D9,"TFT"); // mosi, miso, sclk, cs, reset, dc +DigitalOut LCD_LED(D4); +DigitalOut myled(D5); int main() -{ - int i; +{int i; + while(1){ + // int i; + LCD_LED = 1; // backlight on + myled = 1; //unsigned int y; TFT.claim(stdout); // send stdout to the TFT display //TFT.claim(stderr); // send stderr to the TFT display - //TFT.set_orientation(1); + TFT.set_orientation(1); TFT.background(Black); // set background to black TFT.foreground(White); // set chars to white TFT.cls(); // clear the screen //y= 0; - TFT.background(Black); + // TFT.background(White); // set background to black + // TFT.foreground(Black); // set chars to white + // TFT.background(0XC618);//(gray); + TFT.background(Black);//(Black); TFT.cls(); TFT.set_font((unsigned char*) Arial12x12); TFT.locate(0,0); printf(" Hello Mbed "); - wait(5); // wait two seconds + wait(2); // wait two seconds // draw some graphics TFT.cls(); @@ -55,7 +68,7 @@ TFT.fillrect(180,25,220,70,Blue); TFT.circle(80,150,33,White); - TFT.fillcircle(160,190,20,Yellow); + TFT.fillcircle(160,190,20,0XC618);//Yellow double s; @@ -101,6 +114,9 @@ TFT.printf("Graphic from File System"); TFT.locate(10,20); TFT.printf("open test.bmp"); - int err = TFT.BMP_16(20,50,"test.bmp"); - if (err != 1) TFT.printf(" - Err: %d",err); + // int err = TFT.BMP_16(20,50,"test.bmp"); + // if (err != 1) TFT.printf(" - Err: %d",err); + myled = 0; + wait(1); + } }
diff -r 414a960bd52e -r 6c7ede042721 mbed.bld --- a/mbed.bld Wed Jun 12 22:56:43 2013 +0000 +++ b/mbed.bld Sun Oct 15 20:20:46 2017 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/b3110cd2dd17 \ No newline at end of file +https://mbed.org/users/mbed_official/code/mbed/builds/6213f644d804 \ No newline at end of file