Testni program za Banggood displej
Dependencies: SPI_TFT_ILI9341 TFT_fonts mbed
Revision 0:393e8184af1a, committed 2016-03-09
- Comitter:
- esokic
- Date:
- Wed Mar 09 09:14:00 2016 +0000
- Commit message:
- Testni program za Banggood displej (US 2016)
Changed in this revision
diff -r 000000000000 -r 393e8184af1a SPI_TFT_ILI9341.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SPI_TFT_ILI9341.lib Wed Mar 09 09:14:00 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/dreschpe/code/SPI_TFT_ILI9341/#b2b3e5430f81
diff -r 000000000000 -r 393e8184af1a TFT_fonts.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TFT_fonts.lib Wed Mar 09 09:14:00 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/dreschpe/code/TFT_fonts/#76774250fcec
diff -r 000000000000 -r 393e8184af1a main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Mar 09 09:14:00 2016 +0000 @@ -0,0 +1,51 @@ +#include "mbed.h" +#define dp23 P0_0 + + +#include "stdio.h" +#include "SPI_TFT_ILI9341.h" +#include "string" +#include "Arial12x12.h" +#include "Arial24x23.h" +#include "Arial28x28.h" +#include "font_big.h" +//#include "SDFileSystem.h" + +SPI_TFT_ILI9341 TFT(dp2,dp1,dp6,dp24,dp23,dp25,"TFT"); // mosi, miso, sclk, cs, reset, dc + +int main() +{ + int i=0; + //Inicijalizacija; + TFT.claim(stdout); + TFT.set_orientation(1); + TFT.background(Blue); // set background to black + TFT.foreground(White); // set chars to white + TFT.cls(); // clear the screen + + while(1) { + TFT.set_font((unsigned char*) Arial28x28); + TFT.locate(10,10); + printf("Mi volimo US!"); + + wait(2); + //Crtanje linija + TFT.line(0,0,100,0,Green); + TFT.line(0,0,0,200,Green); + TFT.line(0,0,100,200,Green); + + //Crtanje dijagrama piksel po poksel + double s; + for (i=0; i<320; i++) { + s =20 * sin((long double) i / 10 ); + TFT.pixel(i,100 + (int)s ,Red); + } + + wait(2); + TFT.cls(); + + } +} + + +
diff -r 000000000000 -r 393e8184af1a mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Mar 09 09:14:00 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/87f2f5183dfb \ No newline at end of file